cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-8 of 8 results.

A165300 a(n) is the smallest number not already present that permits the cyclic repetition of the path 1,2 of the digits in the sequence.

Original entry on oeis.org

1, 2, 12, 121, 21, 212, 1212, 12121, 2121, 21212, 121212, 1212121, 212121, 2121212, 12121212, 121212121, 21212121, 212121212, 1212121212, 12121212121, 2121212121, 21212121212, 121212121212, 1212121212121, 212121212121
Offset: 1

Views

Author

Keywords

Comments

Conjecture. (1) If n > 1, and a(n) begins and ends with 1, then a(n+1) is obtained by deleting the initial 1 of a(n); (2) if a(n) begins with 1 and ends with 2 then a(n+1) is obtained by adding a final 1 to a(n); (3) if a(n) begins with 2 and ends with 1 then a(n+1) is obtained by adding a final 2 to a(n); (4) if a(n) begins and ends with 2 then a(n+1) is obtained by adding an initial 1 to a(n). This has been confirmed through a(140), which has 71 digits (and should be fairly easy to prove). - John W. Layman, Sep 22 2009

Examples

			Starting from 1,2 the next number must be 12 because after 1,2 we shall continue with a 1. But 1 is already in the sequence so we need to add a 2 -> 12. And so on.
		

Crossrefs

Programs

  • Maple
    P:=proc(i) local a,n; a:=2; print(1);print(2); for n from 3 by 1 to i do a:=1/24*((a+10^floor(1+evalf(log10(a),100)))*(((n-2) mod 4)+((n-1) mod 4)+7*(n mod 4)-5*((n+1) mod 4))+(10*a+1)*(((n-2) mod 4)+7*((n-1) mod 4)-5*(n mod 4)+((n+1) mod 4))+(a-10^floor(evalf(log10(a),100)))*(7*((n-2) mod 4)-5*((n-1) mod 4)+(n mod 4)+((n+1) mod 4))+(10*a+2)*(-5*((n-2) mod 4)+((n-1) mod 4)+(n mod 4)+7*((n+1) mod 4))); print(a); od; end: P(200); # Paolo P. Lava, Oct 02 2009

Formula

a(n+1) = (1/24)*((a(n) + 10^floor(1 + log_10(a(n))))*(((n-2) mod 4) + ((n-1) mod 4) + 7*(n mod 4) - 5*((n+1) mod 4)) + (10*a(n)+1)*(((n-2) mod 4) + 7*((n-1) mod 4) - 5*(n mod 4) + ((n+1) mod 4)) + (a(n) - 10^floor(log_10(a(n))))*(7*((n-2) mod 4) - 5*((n-1) mod 4) + (n mod 4) + ((n+1) mod 4)) + (10*a(n) + 2)*(-5*((n-2) mod 4) + ((n-1) mod 4) + (n mod 4) + 7*((n+1) mod 4))), with n >= 3 and a(1)=1, a(2)=2. - Paolo P. Lava, Oct 02 2009

Extensions

Terms a(21) onward from John W. Layman, Sep 22 2009
Edited by N. J. A. Sloane, Oct 06 2009

A165301 a(n) is the smallest number not already in the sequence, such that the concatenation of all a(n) displays the periodic digit string 1, 2, 3 (and repeat).

Original entry on oeis.org

1, 2, 3, 12, 31, 23, 123, 1231, 231, 2312, 312, 3123, 12312, 31231, 23123, 123123, 1231231, 231231, 2312312, 312312, 3123123, 12312312, 31231231, 23123123, 123123123, 1231231231, 231231231, 2312312312, 312312312, 3123123123, 12312312312, 31231231231
Offset: 1

Views

Author

Keywords

Examples

			Starting from 1, 2, 3, the next number must be 12 because we need to continue with a 1. But 1 is already in the sequence so we need to attach a 2 -> 12. And so on.
		

Crossrefs

Programs

  • Maple
    cyc3 := proc(n) op(n,[2,3,1]) ; end:
    A165301 := proc(n) option remember ; local k,prev,d,a ; if n = 1 then 1; else d := cyc3(procname(n-1) mod 10) ; a := d ; while true do prev := false; for k from 1 to n-1 do if procname(k) = a then prev := true; break; end if; end do; if not prev then return a; end if; d := cyc3(d) ; a := 10*a+d ; end do; end if ; end proc:
    seq(A165301(n),n=1..60) ; # R. J. Mathar, Oct 16 2009

Extensions

Keyword:base added, sequence extended by R. J. Mathar, Oct 16 2009

A165302 a(n) is the smallest number not already in the sequence, such that the concatenation of all a(n) displays the periodic digit string 1, 2, 3, 4 (and repeat).

Original entry on oeis.org

1, 2, 3, 4, 12, 34, 123, 41, 23, 412, 341, 234, 1234, 12341, 2341, 23412, 3412, 34123, 4123, 41234, 123412, 341234, 1234123, 412341, 234123, 4123412, 3412341, 2341234, 12341234, 123412341, 23412341, 234123412, 34123412, 341234123, 41234123, 412341234
Offset: 1

Views

Author

Keywords

Examples

			Starting from 1, 2, 3, 4, the next number must be 12 because we need to continue with a 1. But 1 is already in the sequence so we need to attach a 2 -> 12. And so on.
		

Crossrefs

Programs

  • Maple
    cyc4 := proc(n) op(n,[2,3,4,1]) ; end:
    A165302 := proc(n) option remember ; local k,prev,d,a ; if n = 1 then 1; else d := cyc4(procname(n-1) mod 10) ; a := d ; while true do prev := false; for k from 1 to n-1 do if procname(k) = a then prev := true; break; end if; end do; if not prev then return a; end if; d := cyc4(d) ; a := 10*a+d ; end do; end if ; end proc:
    seq(A165302(n),n=1..60) ; # R. J. Mathar, Oct 16 2009

Extensions

Keyword:base added, sequence extended by R. J. Mathar, Oct 16 2009

A165303 a(n) is the smallest number not already in the sequence, such that the concatenation of all a(n) displays the periodic digit string 1, 2, 3, 4, 5 (and repeat).

Original entry on oeis.org

1, 2, 3, 4, 5, 12, 34, 51, 23, 45, 123, 451, 234, 512, 345, 1234, 5123, 4512, 3451, 2345, 12345, 123451, 23451, 234512, 34512, 345123, 45123, 451234, 51234, 512345, 1234512, 3451234, 5123451, 2345123, 4512345, 12345123, 45123451, 23451234, 51234512
Offset: 1

Views

Author

Keywords

Examples

			Starting from 1, 2, 3, 4, 5, the next number must be 12 because we need to continue with a 1. But 1 is already in the sequence so we need to attach a 2 -> 12. And so on.
		

Crossrefs

Programs

  • Maple
    cyc5 := proc(n) op(n,[2,3,4,5,1]) ; end:
    A165303 := proc(n) option remember ; local k,prev,d,a ; if n = 1 then 1; else d := cyc5(procname(n-1) mod 10) ; a := d ; while true do prev := false; for k from 1 to n-1 do if procname(k) = a then prev := true; break; end if; end do; if not prev then return a; end if; d := cyc5(d) ; a := 10*a+d ; end do; end if ; end proc:
    seq(A165303(n),n=1..60) ; # R. J. Mathar, Oct 16 2009

Extensions

Keyword:base added, sequence extended by R. J. Mathar, Oct 16 2009

A165304 a(n) is the smallest number not already in the sequence, such that the concatenation of all a(n) displays the periodic digit string 1, 2, 3, 4, 5, 6 (and repeat).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 12, 34, 56, 123, 45, 61, 23, 456, 1234, 561, 234, 5612, 345, 612, 3456, 12345, 6123, 4561, 2345, 61234, 56123, 45612, 34561, 23456, 123456, 1234561, 234561, 2345612, 345612, 3456123, 456123, 4561234, 561234, 5612345, 612345, 6123456, 12345612
Offset: 1

Views

Author

Keywords

Examples

			Starting from 1, 2, 3, 4, 5, 6, the next number must be 12 because the leading digit must be a 1. But 1 is already in the sequence so we need to attach a 2 -> 12.
		

Crossrefs

Programs

  • Maple
    cyc6 := proc(n) op(n,[2,3,4,5,6,1]) ; end:
    A165304 := proc(n) option remember ; local k,prev,d,a ; if n = 1 then 1; else d := cyc6(procname(n-1) mod 10) ; a := d ; while true do prev := false; for k from 1 to n-1 do if procname(k) = a then prev := true; break; end if; end do; if not prev then return a; end if; d := cyc6(d) ; a := 10*a+d ; end do; end if ; end proc:
    seq(A165304(n),n=1..60) ; # R. J. Mathar, Oct 16 2009

Extensions

Keyword:base added, sequence extended by R. J. Mathar, Oct 16 2009

A165305 a(n) is the smallest number not yet in the sequence such that the concatenation of all terms yields a periodic stream of digits 1, 2, 3, ..., 7 (repeat from 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 12, 34, 56, 71, 23, 45, 67, 123, 456, 712, 345, 671, 234, 567, 1234, 5671, 2345, 6712, 3456, 7123, 4567, 12345, 67123, 45671, 23456, 71234, 56712, 34567, 123456, 712345, 671234, 567123, 456712, 345671, 234567, 1234567
Offset: 1

Views

Author

Keywords

Examples

			For a(8), having already 1, 2, 3, 4, 5, 6, 7, the next number must be 12 because after 1,2,3,4,5,6,7 we shall continue with a 1.
But 1 is already in the sequence so we need to add a 2 -> 12. And so on.
		

Crossrefs

Extensions

Keyword base added by R. J. Mathar, Feb 02 2010

A165306 a(n) is the smallest number not yet in the sequence such that concatenation of all terms yields an infinite periodic stream of digits 1, 2, 3, ..., 8 (repeat from 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 12, 34, 56, 78, 123, 45, 67, 81, 23, 456, 781, 234, 567, 812, 345, 678, 1234, 5678, 12345, 6781, 2345, 67812, 3456, 7812, 34567, 8123, 4567, 81234, 56781, 23456, 78123, 45678, 123456, 781234, 567812, 345678, 1234567, 812345
Offset: 1

Views

Author

Keywords

Examples

			Considering a(9), having already 1,2,3,4,5,6,7,8, the next number must be 12 because after 1,2,3,4,5,6,7,8 we shall continue with a 1.
But 1 is already in the sequence so we need to add a 2 -> 12. And so on.
		

Crossrefs

Programs

  • Maple
    cyc8 := proc(n) op(n, [2, 3, 4, 5, 6, 7, 8, 1]) ; end:
    A165306 := proc(n) option remember ; local k, prev, d, a ; if n = 1 then 1; else d := cyc8(procname(n-1) mod 10) ; a := d ; while true do prev := false; for k from 1 to n-1 do if procname(k) = a then prev := true; break; end if; end do; if not prev then return a; end if; d := cyc8(d) ; a := 10*a+d ; end do; end if ; end proc:
    seq(A165306(n), n=1..60) ; # R. J. Mathar, Feb 02 2010

Extensions

Keyword base added by R. J. Mathar, Feb 02 2010

A081549 a(1) = 1; for n > 1, a(n) > a(n-1) is the smallest number such that the concatenation a(1)a(2)a(3)... forms a cyclic concatenation of 123456789 (of nonzero digits).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 34, 56, 78, 91, 234, 567, 891, 2345, 6789, 12345, 67891, 234567, 891234, 5678912, 34567891, 234567891, 2345678912, 3456789123, 4567891234, 5678912345, 6789123456, 7891234567, 8912345678, 9123456789
Offset: 1

Views

Author

Amarnath Murthy, Apr 01 2003

Keywords

Crossrefs

Cf. A165307 (non-monotonic version), A007923 (version with strictly increasing length).

Programs

  • Mathematica
    a = {1}; c = 0; Do[c = 10 c + Mod[n, 9] + 1; If[c > a[[-1]], AppendTo[a, c]; c = 0], {n, 170}]; a (* Ivan Neretin, Aug 14 2015 *)

Extensions

Corrected and extended by Sean A. Irvine, Apr 18 2010
Showing 1-8 of 8 results.