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

A152610 Primes appearing in A152607.

Original entry on oeis.org

13, 37, 79, 97, 71, 17, 73, 37, 79, 97, 71, 11, 17, 71, 13, 37, 71, 17, 79, 97, 71, 19, 97, 73, 31, 11, 11, 11, 11, 11, 11, 13, 31, 11, 11, 17, 71, 11, 11, 19, 97, 71, 11, 11, 17, 71, 11, 13, 37, 71, 11, 17, 79, 97, 71, 11, 19, 97, 71, 13, 31, 11, 11, 11, 11, 11
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2009

Keywords

Crossrefs

Cf. A152607.

Extensions

More terms from Amiram Eldar, Apr 11 2025

A152136 a(0) = 0; thereafter a(n) is always the smallest integer > a(n-1) not leading to a contradiction, such that the concatenation of any two consecutive digits in the sequence is a prime.

Original entry on oeis.org

0, 2, 3, 7, 9, 71, 73, 79, 711, 713, 717, 971, 973, 1111, 1113, 1117, 1119, 7111, 7113, 7117, 9711, 9713, 11111, 11113, 11117, 11119, 71111, 71113, 71117, 97111, 97113, 111111, 111113, 111117, 111119, 711111, 711113, 711117, 971111
Offset: 0

Views

Author

N. J. A. Sloane, Sep 24 2009

Keywords

Comments

A variant of A152607 suggested by Zak Seidov, Sep 24 2009.
Computed by Jean-Marc Falcoz.
Comment from Jean-Marc Falcoz: (Start)
The sequence is infinite since it has the following structure:
9713, 11111, 11113, 11117, 11119, 71111, 71113, 71117, 97111,
97113, 111111, 111113, 111117, 111119, 711111, 711113, 711117, 971111,
971113, 1111111, 1111113, 1111117, 1111119, 7111111, 7111113, 7111117, 9711111,
9711113, 11111111, 11111113, 11111117, 11111119, 71111111, 71111113, 71111117, 97111111,
97111113, 111111111, 111111113, 111111117, 111111119, 711111111, 711111113, 711111117, 971111111,
971111113, 1111111111, 1111111113, 1111111117, 1111111119, 7111111111, 7111111113, 7111111117, 9711111111,
9711111113, ... (End)

Crossrefs

Extensions

Offset changed by N. J. A. Sloane, Jun 16 2021

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

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

Original entry on oeis.org

1, 2, 3, 4, 7, 12, 30, 51, 83, 231, 232, 312, 323, 327, 413, 414, 530, 541, 701, 811, 812, 1101, 2110, 3011, 6301, 7030, 7103, 8110, 9011, 21011, 21013, 21017, 21019, 21053, 21055, 21059, 21071, 21073, 21077, 21079, 21413, 21415, 21419
Offset: 1

Views

Author

N. J. A. Sloane, Sep 23 2009

Keywords

Comments

Computed by Jean-Marc Falcoz.
From a(116)=6100011 on, there starts a pattern of 75 terms which then repeats indefinitely (with duplication of a substring of 5 digits in the middle of each term). - M. F. Hasler, Oct 16 2009

Crossrefs

Programs

  • PARI
    A152605(n,show_all=0,s=[1, 2, 3, 4, 7, 12, 30, 51, 83, 231, 232, 312, 323, 327, 413, 414, 530, 541, 701, 811, 812, 1101])={ my(a); for(i=1,n, if(i<=#s,a=s[i], my(ld=a%10^4); while(a++,my(t=a+ld*10^#Str(a));forstep(d=#Str(a)-1,0,-1,isprime(sum(j=d,d+4,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

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

A363572 Lexicographically earliest sequence of distinct terms > 0 such that the concatenation of the rightmost digit of a(n) and the leftmost digit of a(n+1) forms a prime number. The rightmost digit of a(n) cannot be 0.

Original entry on oeis.org

1, 3, 7, 9, 71, 11, 12, 31, 13, 14, 15, 32, 33, 16, 17, 18, 34, 19, 72, 35, 36, 73, 74, 37, 38, 39, 75, 91, 76, 77, 92, 93, 78, 94, 79, 701, 95, 96, 101, 97, 98, 99, 702, 301, 102, 302, 303, 103, 104, 105, 304, 106, 107, 108, 305, 306, 109, 703, 111, 112, 307, 113, 114, 115
Offset: 1

Views

Author

Eric Angelini, Aug 17 2023

Keywords

Examples

			a(1) = 1 and a(2) = 3 form 13, a prime number;
a(2) = 3 and a(3) = 7 form 37, a prime number;
a(3) = 7 and a(4) = 9 form 79, a prime number;
a(4) = 9 and the leftmost digit of a(5) = 71 form 97, a prime number;
a(5) = 71 and its rightmost digit, concatenated to the leftmost digit of a(6) = 11, form 11, a prime number; etc.
		

Crossrefs

Cf. A152607.

A354839 Beginning with 0, smallest positive integer not yet in the sequence such that the concatenation of two digits of the sequence separated by a comma is prime.

Original entry on oeis.org

0, 2, 3, 1, 7, 9, 70, 5, 30, 20, 21, 10, 22, 31, 11, 12, 32, 33, 13, 14, 15, 34, 16, 17, 18, 35, 36, 19, 71, 37, 38, 39, 72, 90, 23, 73, 74, 75, 91, 76, 77, 92, 93, 78, 94, 79, 700, 24, 100, 25, 95, 96, 101, 97, 98, 99, 701, 102, 300, 26, 103, 104, 105, 301
Offset: 0

Views

Author

Carole Dubois, Jun 08 2022

Keywords

Examples

			a(4)=1 because this is the first number not in the sequence whose first digit is 3 (last digit of a(3)), concatenated with its first digit 1, is prime: 31.
a(14)=31 because this is the first number not in the sequence whose first digit is 2 (last digit of a(13)), concatenated with its first digit 3, is prime: 23.
		

Crossrefs

Programs

  • Python
    from sympy import isprime
    from itertools import count, islice
    def agen(): # generator of terms
        aset, k, mink = {0}, 0, 1; yield 0
        for n in count(2):
            k, prevdig = mink, str(k%10)
            while k in aset or not isprime(int(prevdig+str(k)[0])): k += 1
            aset.add(k); yield k
            while mink in aset: mink += 1
    print(list(islice(agen(), 64))) # Michael S. Branicky, Jun 09 2022
Showing 1-7 of 7 results.