Sequences - Xref - Sequences - odd


App: regression/framework Page: sequence/a_run_from_the_integer_end_answers_nothing
PHP
HTML
sequence/a_run_from_the_integer_end_answers_nothing.pad
Result
[{sequence polite, from=9223372036854775800, rows=2}{$sequence} @else@none{/sequence}][{sequence lucky, from=9223372036854775800, rows=2}{$sequence} @else@none{/sequence}][{sequence even, from=9223372036854775800, rows=2}{$sequence} @else@none{/sequence}][{sequence odd, from=-9223372036854775800, rows=2}{$sequence} @else@none{/sequence}][{sequence polite, from=1000, rows=2}{$sequence} {/sequence}][{sequence lucky, from=1000, rows=2}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_walk_of_the_values_takes_the_window_the_tag_gave
PHP
HTML
sequence/a_walk_of_the_values_takes_the_window_the_tag_gave.pad
Result
[{sequence even, build='check', to=10}{$sequence} {/sequence}][{sequence even, build='bool', to=10}{$sequence} {/sequence}][{sequence odd, build='bool', from=4, to=9}{$sequence} {/sequence}]

App: regression/framework Page: sequence/build_function_is_the_term_at_each_position_of_a_type_that_steps_itself
PHP
HTML
sequence/build_function_is_the_term_at_each_position_of_a_type_that_steps_itself.pad
Result
[{sequence step=3, build='function', from=2, to=4}{$sequence} {/sequence}][{sequence '2;3;4', make, step=3, build='function'}{$sequence} {/sequence}][{sequence '2;3;4', make, even, build='function'}{$sequence} {/sequence}][{sequence even, build='function', from=2, to=4}{$sequence} {/sequence}][{sequence '1..6', make, odd, build='function'}{$sequence} {/sequence}][{sequence odd, build='function', from=2, to=4}{$sequence} {/sequence}][{sequence step=3, rows=4}{$sequence} {/sequence}][{sequence '2;3;4', make, step=3}{$sequence} {/sequence}][{sequence multiple=3, build='function', from=2, rows=3}{$sequence} {/sequence}][{sequence '1..3', make, multiple=3, build='function'}{$sequence} {/sequence}][{sequence step=3, build='function', increment=2, rows=3}{$sequence} {/sequence}][{sequence even, build='function', rows=3}{$sequence} {/sequence}]

App: regression/framework Page: sequence/build_function_on_a_type_that_steps_itself_gives_the_term_past_the_ceiling
PHP
HTML
sequence/build_function_on_a_type_that_steps_itself_gives_the_term_past_the_ceiling.pad
Result
[{sequence even, build='function', from=3000000, rows=3}{$sequence} @else@none{/sequence}][{sequence odd, build='function', from=1000000, rows=3}{$sequence} @else@none{/sequence}][{sequence step=3, build='function', from=1000000, rows=3}{$sequence} @else@none{/sequence}][{sequence multiple=3, build='function', from=1000000, rows=3}{$sequence} @else@none{/sequence}][{sequence '999999;1000000;1000001', make, even, build='function'}{$sequence} @else@none{/sequence}][{sequence even, build='function', from=4611686018427387902, rows=3}{$sequence} @else@none{/sequence}][{sequence step=2.5, build='function', from=3, rows=3}{$sequence} @else@none{/sequence}]

App: regression/framework Page: sequence/even_and_odd_from_past_the_float_range_answer_an_empty_run
PHP
sequence/even_and_odd_from_past_the_float_range_answer_an_empty_run.php
HTML
sequence/even_and_odd_from_past_the_float_range_answer_an_empty_run.pad
Result
<?php

$f
= '1e400';
$g = '-1e400';

?>
[{sequence even, from=$f, rows=3}{$sequence} {/sequence}][{sequence odd, from=$f, rows=3}{$sequence} {/sequence}][{sequence even, sole=$g}{$sequence} {/sequence}][{sequence odd, from=$g, rows=3}{$sequence} {/sequence}]

App: regression/framework Page: sequence/even_and_odd_step_by_the_increment_they_are_given
PHP
HTML
sequence/even_and_odd_step_by_the_increment_they_are_given.pad
Result
[{sequence even, increment=3, rows=4}{$sequence} {/sequence}][{sequence odd, increment=3, rows=4}{$sequence} {/sequence}][{sequence even, from=2, to=8, increment=2}{$sequence} {/sequence}][{sequence even, rows=3}{$sequence} {/sequence}][{sequence '1..10', increment=2, keep, even}{$sequence} {/sequence}]

App: regression/framework Page: sequence/odd
PHP
HTML
sequence/odd.pad
Result
{sequence odd, rows=8}
{$sequence},
{/sequence}

App: regression/framework Page: sequence/odd_gnomonic_and_polite_reach_the_largest_integer
PHP
HTML
sequence/odd_gnomonic_and_polite_reach_the_largest_integer.pad
Result
[{sequence odd, from=4503599627370497, rows=3}{$sequence} {/sequence}][{sequence odd, from=4503599627370496, rows=3}{$sequence} {/sequence}][{sequence gnomonic, from=4503599627370497, rows=3}{$sequence} {/sequence}][{sequence odd, from=4611686018427387904}{$sequence} {/sequence}][{sequence gnomonic, from=4611686018427387904}{$sequence} @else@none{/sequence}][{sequence polite, from=9223372036854775680, rows=2}{$sequence} @else@none{/sequence}][{sequence polite, from=9223372036854775679, rows=2}{$sequence} {/sequence}][{sequence '9223372036854775743;9223372036854775807', flag, polite}{$sequence}{/sequence}][{sequence polite, from=9223372036854775744, rows=2}{$sequence} @else@none{/sequence}]

App: sequence Page: basic/odd

App: sequence Page: gallery
PHP
gallery.php
HTML
gallery.pad
Result
<?php

// The gallery: every sequence type that needs no parameter, its first 24 terms drawn as a
// {sparkline}, the first eight written out, and the OEIS entry the terms come from - a
// link to oeis.org, found in the table the oeis type reads (seqFunOeis in _lib/fun.php).

$drawn = [];

foreach (
seqFunTypes () as $type ) {

$terms = seqFunTerms ( $type, 24 );
$oeis = seqFunOeis ( $terms, $type );

$drawn [] = [
'type' => $type,
'first' => implode ( ', ', array_slice ( $terms, 0, 8 ) ),
'oeis' => $oeis ? sprintf ( 'A%06d', $oeis ) : ''
];

}

?>
<p>Every sequence type that needs no parameter, its first 24 terms drawn by
<code>{sparkline sequence=$type, rows=24}</code>, beside the
<a href="https://oeis.org">OEIS</a> entry the terms come from. Follow a name to hear it.</p>

<table cellpadding="4">
{drawn}
<tr>
<td align="right"><a href="?listen&type={$type}">{$type}</a></td>
<td>{sparkline sequence=$type, rows=24}</td>
<td align="left"><small>{$first}, ...</small></td>
<td>{if $oeis ne ''}<a href="https://oeis.org/{$oeis}">{$oeis}</a>{/if}</td>
</tr>
{/drawn}
</table>

App: sequence Page: listen
PHP
listen.php
HTML
listen.pad
Result
<?php

// Listen: a sequence played as notes. Each of the first 32 terms becomes a note - the
// term modulo 60, five octaves up from C2, the way the OEIS 'listen' button folds a term
// into the keyboard - and the notes are written as a WAV file into the page itself
// (seqFunWav in _lib/fun.php), so an <audio> element plays them without JavaScript.
// Recamán's sequence, which jumps back and forth, is the famous one to listen to.
//
// type arrives from the query string and is used only when it names a type the gallery
// draws.

$choices = seqFunTypes ();

if ( ! isset (
$type ) or ! is_string ( $type ) or ! in_array ( $type, $choices ) )
$type = 'recaman';

$terms = seqFunTerms ( $type, 32 );
$oeis = seqFunOeis ( $terms, $type );
$oeis = $oeis ? sprintf ( 'A%06d', $oeis ) : '';
$list = implode ( ', ', $terms );
$notes = implode ( ' ', array_map ( 'seqFunNoteName', seqFunNotes ( $terms ) ) );
$audio = seqFunWav ( $terms );

?>
<p>{choices}{notFirst} | {/notFirst}{if $choices eq $type}<b>{$choices}</b>@else@<a href="?listen&type={$choices}">{$choices}</a>{/if}{/choices}</p>

<h3>{$type | ucfirst}{if $oeis ne ''} - <a href="https://oeis.org/{$oeis}">{$oeis}</a>{/if}</h3>

{chart 'line', data='terms', title='{$type | ucfirst}, the first 32 terms', width=640, height=220}

<p><audio controls preload="none" src="{$audio}"></audio></p>

<p>Each term is a note: the term modulo 60, counted in semitones up from C2.</p>

<p><small>{$list}</small></p>

<p><small>{$notes}</small></p>

App: sequence Page: play/single/even

App: sequence Page: play/single/odd

App: sequence Page: sequences
PHP
sequences.php
HTML
Result
<?php

echo "{table}";

echo
str_pad ( "{demo}{sequence}", 38) . "{\$sequence} {/sequence} {/demo}";

foreach (
types () as $type ) {

$parm = pqParm ( $type );

if (
$type == 'oeis' ) $gox = "oeis=87";
elseif (
$type == 'list' ) $gox = "list='1;8;5;2;9;66'";
elseif (
$type == 'range' ) $gox = "range='1..10'";
elseif (
$type == 'eval' ) $gox = "eval='@ * 10 | @ - 1'";
elseif (
$type == 'random' ) $gox = 'random, maximal=99';
else
$gox = "$type$parm";

echo
str_pad ( "{demo}{sequence $gox}", 38) . "{\$sequence} {/sequence} {/demo}";

}

echo
"{/table}";

?>

App: sequence Page: specials/even_odd