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

A383979 a(n) is the number of n-digit terms in A383978.

Original entry on oeis.org

0, 1, 15, 106, 821, 6909, 58683, 509654, 4508611, 40421003, 366300162, 3348975103, 30845805300, 285887726304, 2663962455651, 24939375901980
Offset: 1

Views

Author

Stefano Spezia, May 16 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=Module[{count=0},For[k=Prime[PrimePi[10^(n-1)]+1], k<=Prime[PrimePi[10^n-1]],k=NextPrime[k],If[Part[d=IntegerDigits[k],l=IntegerLength[k]]==Part[d,l-1],count++]]; count]; Array[a,7]
  • Python
    from sympy import isprime
    def a(n):
        if n < 3: return n-1
        return sum(1 for i in range(10**(n-1), 10**n, 100) for k in (11, 33, 77, 99) if isprime(i+k))
    print([a(n) for n in range(1, 10)]) # Michael S. Branicky, May 20 2025

Extensions

a(12) from Michael S. Branicky, May 20 2025
a(13) from Michael S. Branicky, May 27 2025
a(14)-a(15) from Lyle Blosser, Jul 09 2025
a(15) corrected by Lyle Blosser, Aug 09 2025
a(16) from Lyle Blosser, Aug 23 2025

A384014 a(n) is the number of n-digit terms in A384013.

Original entry on oeis.org

0, 1, 16, 108, 834, 6893, 58659, 510839, 4515301, 40477023, 366751460, 3352789726, 30877698604, 286159371452, 2666303391801, 24959756192476, 234610874384116, 2213224276178123, 20945897352118544, 198802912201260034, 1891788092230264832, 18044365524165259927, 172479703095316537972
Offset: 1

Views

Author

Stefano Spezia, May 17 2025

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]:=0; a[n_]:=Module[{count=0},For[k=Prime[PrimePi[10^(n-1)]+1], k<=Prime[PrimePi[10^n-1]],k=NextPrime[k],If[Part[d=IntegerDigits[k],1]==Part[d,2],count++]]; count]; Array[a,7]

Extensions

a(11)-a(23) from David Radcliffe, May 17 2025

A384015 Primes with at least two identical trailing digits and at least two identical leading digits.

Original entry on oeis.org

11, 11177, 11299, 11311, 11399, 11411, 11633, 11677, 11699, 11777, 11833, 11933, 22111, 22133, 22277, 22433, 22511, 22699, 22777, 22811, 22877, 33199, 33211, 33311, 33377, 33533, 33577, 33599, 33811, 33911, 44111, 44533, 44633, 44699, 44711, 44777, 55333, 55399
Offset: 1

Views

Author

Stefano Spezia, May 17 2025

Keywords

Crossrefs

Subsequence of A050758.

Programs

  • Mathematica
    Select[Prime[Range[5,6000]],Part[d=IntegerDigits[#],l=IntegerLength[#]]==Part[d,l-1] && Part[d,1]==Part[d,2] &]
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A384015_gen(): # generator of terms
        yield 11
        for n in count(2):
            yield from filter(isprime,(i+j+k for i in range(11*10**(n-2),11*10**(n-1),11*10**(n-2)) for j in range(0,10**(n-2),100) for k in (11,33,77,99)))
    A384015_list = list(islice(A384015_gen(),38)) # Chai Wah Wu, May 20 2025
Showing 1-3 of 3 results.