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.

A120819 Indices of primes in A057137.

Original entry on oeis.org

171, 277, 367, 561, 567, 18881
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in ascending order beginning with 1 and after 9 comes 0.
Indices of primes in A057137.
All terms must end in 1 or 7: A057137(n) is even when n is even, and divisible by 3 iff n == 0, 2, 3, 5, 6, 8 or 9 (mod 10). - M. F. Hasler, Apr 14 2024
a(7) >= 100000. - Michael S. Branicky, Apr 07 2025

Examples

			a(1) = 12345678901234567890...01234567890...012345678901 = A057137(171) is the first prime term in A057137.
		

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 61, 298.

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst
    IntegerLength[Select[Table[FromDigits[PadRight[{},n,{1,2,3,4,5,6,7,8,9,0}]],{n,1,1001,2}],PrimeQ]] (* Harvey P. Dale, Feb 07 2024 *)
  • PARI
    N=0;for(n=1,600,if(ispseudoprime(N=10*N+n%10),print1(n", "))) \\ Charles R Greathouse IV, May 10 2014  (Comment: Surprisingly, this is faster than calling ispseudoprime() only when n ends in 1 or 7, even when much larger N's are considered, e.g., up to 3000. - M. F. Hasler, Apr 14 2024)
    
  • Python
    from sympy import isprime
    L = ['8901', '234567']; s = '1234567'; c = len(s); m = 0
    while c < 18881:
        s += L[m%2]; c = len(s); m += 1
        if isprime(int(s)): print(c, end = ', ')  # Ya-Ping Lu, Jan 24 2025

Extensions

a(6) from Arjen Lenstra, Feb 20 2012

A120829 a(n) consecutive digits descending beginning with the digit 4 give a prime.

Original entry on oeis.org

2, 64, 176, 1502, 4676, 7518, 8244, 8318
Offset: 1

Views

Author

Robert G. Wilson v, Jul 05 2006

Keywords

Comments

Digits are in descending order beginning with 4 and after 0 comes 9.
a(9) > 10^5. - Michael S. Branicky, Apr 22 2025

Examples

			2 is a term since 43 is a prime.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := PrimeQ@ FromDigits@ Mod[5-Range@n, 10]; lst = {}; Do[ If[fQ@n, AppendTo[lst, n]; Print@n], {n, 10000}]; lst

Extensions

a(6)-a(7) corrected and a(8) from Michael S. Branicky, Apr 08 2025
Showing 1-2 of 2 results.