Sequences - Xref - Options - from


App: manual Page: fragments/sequences_1
PHP
HTML
fragments/sequences_1.pad
Result
<p>{sequence '1..8'}{$sequence} {/sequence}</p>
<p>{sequence fibonacci, rows=8}{$sequence} {/sequence}</p>
<p>{sequence prime, from=10, rows=6}{$sequence} {/sequence}</p>
<p>{sequence 'A..F'}{$sequence} {/sequence}</p>

App: manual Page: pages/sequences
PHP
HTML
pages/sequences.pad
Result
{meta title='Sequences'}

<p>The <code>{sequence}</code> tag generates values instead of reading them: a
range, a mathematical series, letters - 122 types, each iterated like any data
tag:</p>

{example 'fragments/sequences_1'}

<p>That is the smallest corner of a whole subsystem: plays that keep, remove or flag terms,
stores that pass a sequence from one tag to the next, actions that transform it, and random
draws with their own rules. It has an application of its own, which is its manual:</p>

<p><b><a href="{$padHost}sequence/">The sequence application</a></b> - every type, play,
action and option, demonstrated live.</p>
<h2>Seeing and hearing them</h2>

<p>A sequence is data like any other, so {tag 'chart'} and {tag 'sparkline'} draw it
straight away with <code>sequence=</code>:</p>

{example 'fragments/sequences_2'}

<p>The sequence application has three pages built on that: the
<a href="{$padHost}sequence/?gallery">Gallery</a> draws every type beside the OEIS entry its
terms come from, <a href="{$padHost}sequence/?listen">Listen</a> plays a sequence as notes -
Recamán's is the famous one - in an audio file written into the page, and
<a href="{$padHost}sequence/?guess">Guess</a> shows the start of a sequence and asks for the
next term.</p>

App: regression/framework Page: lenient/a_sequence_parameter_that_is_no_number_takes_its_default
PHP
lenient/a_sequence_parameter_that_is_no_number_takes_its_default.php
HTML
lenient/a_sequence_parameter_that_is_no_number_takes_its_default.pad
Result
<?php

// The lenient walk under test: with the syntax check off, what cannot run passes the
// value through or yields empty, and the walk carries on.

$padCheckSyntax = FALSE;

?>
[{sequence '1;2;3', from='abc'}{$sequence} {/sequence}][{sequence 3, increment='x'}{$sequence} {/sequence}][{sequence 3, skip='x'}{$sequence} {/sequence}][{sequence 3, minimal='x'}{$sequence} {/sequence}][{sequence prime, to='x', rows=3}{$sequence} {/sequence}]

App: regression/framework Page: lenient/lucky_past_the_numbers_it_follows_is_no_term
PHP
lenient/lucky_past_the_numbers_it_follows_is_no_term.php
HTML
lenient/lucky_past_the_numbers_it_follows_is_no_term.pad
Result
<?php

// The lenient walk under test: with the syntax check off, what cannot run passes the
// value through or yields empty, and the walk carries on.

$padCheckSyntax = FALSE;

?>
[{sequence lucky, from=9223372036854775800, rows=2}{$sequence} @else@none{/sequence}][{sequence '1999999;2000029;9', flag, lucky}{$sequence}{/sequence}]

App: regression/framework Page: passes/a_prefixed_sequence_pair_keeps_its_closing_tag_inside_a_pass
PHP
HTML
passes/a_prefixed_sequence_pair_keeps_its_closing_tag_inside_a_pass.pad
Result
{code}{prime:keep rows=3, from=10}{$sequence},{/prime:keep}{/code}

App: regression/framework Page: prefixes/keep_names_a_play_over_a_type
PHP
HTML
prefixes/keep_names_a_play_over_a_type.pad
Result
{keep:prime rows=4, from=10}
{$sequence},
{/keep:prime}

App: regression/framework Page: sequence/a_bare_multiple_is_one_in_whole_numbers
PHP
HTML
sequence/a_bare_multiple_is_one_in_whole_numbers.pad
Result
[{sequence multiple, from=9223372036854775800, rows=3}{$sequence} {/sequence}][{sequence '9223372036854775800;5', make, multiple}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_formula_has_no_term_below_its_first_position
PHP
HTML
sequence/a_formula_has_no_term_below_its_first_position.pad
Result
[{sequence pentagonal, from=-2, rows=3}{$sequence} {/sequence}][{sequence polite, from=-1, rows=3}{$sequence} {/sequence}][{sequence pell, from=-2, rows=3}{$sequence} {/sequence}][{sequence gnomonic, from=-1, rows=3}{$sequence} {/sequence}][{sequence tetrahedral, from=-2, rows=3}{$sequence} {/sequence}][{sequence octahedral, from=-1, rows=3}{$sequence} {/sequence}][{sequence '-2..2', make, hexagonal}{$sequence} {/sequence}][{sequence decagonal, from=1.5, rows=2}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_formula_type_answers_a_far_position_and_a_value_loop_counts_by_position
PHP
HTML
sequence/a_formula_type_answers_a_far_position_and_a_value_loop_counts_by_position.pad
Result
[{echo sequence:square(2000000)}][{echo sequence:pentagonal(1000001)}][{echo sequence:cubic(2000000)}][{echo sequence:square(5)}][{sequence emirp, build='function', from=3, rows=2}{$sequence} {/sequence}][{sequence multiple=3, build='function', from=2, rows=3}{$sequence} {/sequence}][{sequence golomb, build='function', rows=5}{$sequence} {/sequence}][{sequence pentagonal, build='function', from=3, rows=2}{$sequence} {/sequence}][{sequence cullen, from=56, rows=4}{$sequence} {/sequence}][{sequence '0..3', make, kynea}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_function_type_takes_a_whole_position_however_written
PHP
HTML
sequence/a_function_type_takes_a_whole_position_however_written.pad
Result
[{sequence newmanConway, from=3.0, rows=2}{$sequence} {/sequence}][{sequence newmanConway, from='+3', rows=2}{$sequence} {/sequence}][{sequence bell, from=3.0, rows=2}{$sequence} {/sequence}][{sequence '3.0;+3;3e0', make='newmanConway'}{$sequence} {/sequence}][{sequence '3.0;+3;3e0', make='bell'}{$sequence} {/sequence}][{sequence '4;4.0', make, bell, flag, odd}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_generated_run_past_the_lucky_numbers_ends_quietly
PHP
HTML
sequence/a_generated_run_past_the_lucky_numbers_ends_quietly.pad
Result
[{sequence lucky, from=1999990, rows=3}{$sequence} @else@none{/sequence}][{sequence from=1999999, rows=3, flag='lucky'}{$sequence}{/sequence}]

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

// A ceiling of 50,000 candidates: strong's fourth term, 40585, stands within it, and the walk
// that goes on from it for a fifth has what is left of the candidates and comes up short.

$padSeqMaxTries = 50000;

?>
[{sequence '1..6', make, strong, build='order'}{$sequence} {/sequence}][{sequence '5;1;9;3;12', make, happy, build='order'}{$sequence} {/sequence}][{sequence '3;1;8;2;20', make, lucky, build='order'}{$sequence} {/sequence}][{sequence '1;2;1;3;4;5', make, strong, build='function'}{$sequence} {/sequence}][{sequence harshad, build='function', from=9, rows=4}{$sequence} {/sequence}][{sequence '1..6', make, amicable, build='order'}{$sequence} {/sequence}][{sequence amicable, build='function', from=3, rows=4}{$sequence} {/sequence}]

App: regression/framework Page: sequence/a_negative_number_is_no_prime
PHP
HTML
sequence/a_negative_number_is_no_prime.pad
Result
{sequence '-10..10', keep='prime'}{$sequence} {/sequence}|{sequence prime, from=-5, rows=3}{$sequence} {/sequence}

App: regression/framework Page: sequence/a_play_over_a_parameterised_type
PHP
HTML
sequence/a_play_over_a_parameterised_type.pad
Result
{sequence loop, from=6, rows=8, remove='power|2'}
{$sequence},
{/sequence}

App: regression/framework Page: sequence/a_play_over_a_range_that_includes_zero_terminates
PHP
HTML
sequence/a_play_over_a_range_that_includes_zero_terminates.pad
Result
{sequence loop, from=0, rows=4, keep='power|2'}
{$sequence},
{/sequence}