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.

Previous Showing 21-24 of 24 results.

A065680 Number of primes <= prime(n) which begin with a 1.

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2001

Keywords

Comments

Considering the frequency of all decimal digits in leading position of prime numbers (A065681 - A065687), we cannot apply Benford's Law. But we observe at 10^e - levels that the frequency for 0 to 9 decreases monotonically, at least in the small range until 10^7.
The "begins with 9" sequence is too dull to include. - N. J. A. Sloane
Note that the primes do not satisfy Benford's law (see A000040). - N. J. A. Sloane, Feb 08 2017

Examples

			13 is the second prime beginning with 1: A000040(6) = 13, therefore a(6) = 2. a(664579) = 80020 (A000040(664579) = 9999991 is the largest prime < 10^7).
		

Crossrefs

Programs

  • Mathematica
    Accumulate[If[First[IntegerDigits[#]]==1,1,0]&/@Prime[Range[80]]] (* Harvey P. Dale, Jan 22 2013 *)
  • PARI
    lista(n) = { my(a=[p\10^logint(p,10)==1 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009

A355430 Primes starting with an even decimal digit.

Original entry on oeis.org

2, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 809, 811, 821
Offset: 1

Views

Author

Bernard Schott, Jul 20 2022

Keywords

Comments

Primes whose reversal is an even integer.

Examples

			43 is a term because 43 is prime and 34 is an even number.
		

Crossrefs

Intersection of A000040 and A273892.
Equals disjoint union of A045708, A045710, A045712 and A045714.
Primes whose reversal is a multiple of k: this sequence (k=2), {3} (k=3), A045711 (k=5), A087762 (k=7), {11} (k=11), A087764 (k=13), A087765 (k=17), A087766 (k=19), A087767 (k=23).

Programs

  • Mathematica
    imax=142; a={}; For[i=1, i<=imax, i++, If[EvenQ[FromDigits[Reverse[IntegerDigits[Prime[i]]]]], AppendTo[a,Prime[i]]]]; a (* Stefano Spezia, Jul 20 2022 *)
    Select[Prime[Range[200]],EvenQ[IntegerDigits[#][[1]]]&] (* Harvey P. Dale, May 18 2025 *)
  • PARI
    isok(k) = isprime(k) && !(fromdigits(Vecrev(digits(k))) % 2); \\ Michel Marcus, Jul 20 2022
    
  • Python
    from sympy import isprime
    def ok(n): return str(n)[0] in "2468" and isprime(n)
    print([k for k in range(822) if ok(k)]) # Michael S. Branicky, Jul 25 2022
    
  • Python
    from sympy import isprime
    from itertools import chain, count, islice, product
    def agen(): yield from chain((2,), (t for t in (b+i for d in count(1) for b in range(2*10**d, 10*10**d, 2*10**d) for i in range(1, 10**d, 2)) if isprime(t)))
    print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 25 2022

A036433 Number of divisors is a digit in the base 10 representation of n.

Original entry on oeis.org

1, 2, 14, 23, 29, 34, 46, 63, 68, 74, 76, 78, 88, 94, 116, 127, 128, 134, 138, 141, 142, 143, 145, 146, 164, 182, 184, 186, 189, 194, 196, 211, 214, 223, 227, 229, 233, 236, 238, 239, 241, 247, 248, 249, 251, 254, 257, 258, 261, 263, 268, 269, 271, 274, 277
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Invented by the HR concept formation program.

Examples

			14 has 4 divisors and 4 is a digit in the base 10 representation of 14.
		

Crossrefs

Programs

  • Haskell
    a036433 n = a036433_list !! (n-1)
    a036433_list = filter f [1..] where
       f x = d < 10 && ("0123456789" !! d) `elem` show x where d = a000005 x
    -- Reinhard Zumkeller, Mar 15 2012
    
  • Mathematica
    Select[Range[300],MemberQ[IntegerDigits[#],DivisorSigma[0,#]]&] (* Harvey P. Dale, Sep 02 2013 *)
  • Python
    from sympy import divisor_count
    A036433_list = []
    for i in range(1,10**5):
        d = divisor_count(i)
        if d < 10 and str(d) in str(i):
            A036433_list.append(i) # Chai Wah Wu, Jan 07 2015

A065681 Number of primes <= prime(n) which begin with a 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 13 2001

Keywords

Examples

			After 2 and 23, 29 is the third prime beginning with 2: A000040(10) = 29, therefore a(10) = 3. a(664579) = 77025 (A000040(664579) = 9999991 is the largest prime < 10^7).
		

Crossrefs

Programs

  • Mathematica
    Accumulate@ Array[Boole[First@ IntegerDigits@ Prime@ # == 2] &, 87] (* Michael De Vlieger, Jun 14 2018 *)
  • PARI
    lista(n) = { my(a=[p\10^logint(p,10)==2 | p<-primes(n)]); for(i=2, #a, a[i]+=a[i-1]); a} \\ Harry J. Smith, Oct 26 2009
Previous Showing 21-24 of 24 results.