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-2 of 2 results.

A152603 a(1) = 1; thereafter, a(n) is always the smallest integer > a(n-1) not leading to a contradiction, such that any three consecutive digits in the sequence sum up to a prime.

Original entry on oeis.org

1, 2, 4, 5, 8, 41, 60, 70, 410, 412, 416, 418, 452, 454, 458, 470, 472, 476, 478, 812, 814, 818, 830, 832, 836, 838, 872, 874, 878, 2101, 2210, 2300, 2302, 3002, 3003, 4011, 5110, 6101, 6410, 6500, 7002, 9020, 9200, 20020, 30020, 30021, 40110
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2009

Keywords

Comments

Computed by Jean-Marc Falcoz.
From a(34)=3002 on, there starts a pattern [ 3(002){n}, ..., 2(002){n+1} ] of length 52 which then repeats forever. This allows us to write an explicit formula for any term a(n) of the sequence. - M. F. Hasler, Oct 16 2009

Crossrefs

Programs

  • PARI
    A152603(n,show_all=0)={ my(a); for(i=1,n, if(i<4,a=2^i/2, my( l2d=a%100+if(i<7,10*[1,2,4,5][i-2])); while(a++,my(t=a+l2d*10^#Str(a)); forstep(d=#Str(a)-1,0,-1, isprime(z=t\10^d%10+t\10^(d+1)%10+t\10^(d+2)%10) & next; a+=10^d-a%10^d-1; next(2)); break)); show_all&print1(a", ")); a} \\ M. F. Hasler, Oct 16 2009

Formula

a(n) = b(n)*10^[3n/52] = c(n)*10^(3n/52) with (except for smaller initial terms) 20 < b(n) < 611 and c(52k+23) = 9.89... < c(n) < c(52k) = 91.1... for all integers k > 0. - M. F. Hasler, Oct 16 2009

A152606 a(1) = 1; thereafter a(n) is always the smallest integer > a(n-1) not leading to a contradiction, such that any six consecutive digits in the sequence sum up to a prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 21, 45, 83, 89, 450, 503, 630, 701, 810, 901, 2101, 2103, 4121, 6301, 6303, 6503, 6901, 43030, 70103, 81010, 90101, 210101, 210103, 210107, 210109, 210143, 210145, 210149, 210161, 210163, 210167, 210169, 210503
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2009

Keywords

Comments

Computed by Jean-Marc Falcoz.
From a(269) = 1010001010 on, there starts a pattern of 104 terms, which then repeats indefinitely (with 6 digits in the middle of each term duplicated). - M. F. Hasler, Oct 16 2009

Crossrefs

Programs

  • PARI
    a(n, show_all=0, s=[1, 2, 3, 4, 5, 8, 9, 21, 45, 83, 89, 450, 503, 630, 701, 810, 901, 2101, 2103, 4121, 6301, 6303, 6503, 6901, 43030])={ my(a,nd=#Str(s[ #s])); for(i=1,n, if( i<=#s, a=s[i], my(ld=a%10^nd); while(a++,my(t=a+ld*10^#Str(a));forstep(d=#Str(a)-1,0,-1,isprime(sum(j=d,d+nd,t\10^j%10))&next;a+=10^d-a%10^d-1; next(2));break));show_all & print1(a", "));a} \\ M. F. Hasler, Oct 16 2009
Showing 1-2 of 2 results.