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.

A107740 Number of numbers m such that prime(n) = m + (digit sum of m).

Original entry on oeis.org

1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 0, 1, 1, 0, 1
Offset: 1

Views

Author

Reinhard Zumkeller, May 23 2005

Keywords

Comments

a(A049084(A006378(n))) = 0; a(A049084(A048521(n))) > 0. [Corrected by Reinhard Zumkeller, Sep 27 2014]
a(n) <= 2 for n <= 10^5. Conjecture: sequence is bounded.
I would rather conjecture the opposite. Of course a(n) >= m implies n >= A006064(m), having more than A230857(m) digits, i.e., 14, 25 and 1111111111125 digits of n, for a(n) = 3, 4, 5. - M. F. Hasler, Nov 09 2018

Examples

			A000040(26) = 101 = 91 + (9 + 1) = 100 + (1 + 0 + 0): a(26) = # {91, 100} = 2.
		

Crossrefs

Programs

  • Haskell
    a107740 n = length [() | let p = a000040 n,
                             m <- [max 0 (p - 9 * a055642 p) .. p - 1],
                             a062028 m == p]
    -- Reinhard Zumkeller, Sep 27 2014
    
  • Mathematica
    Table[p=Prime[n];c=0;i=1;While[iJayanta Basu, May 03 2013 *)
  • PARI
    apply( A107740(n)=A230093(prime(n)), [1..150]) \\ M. F. Hasler, Nov 08 2018

Formula

a(n) = A230093(prime(n)), i.e.: A107740 = A230093 o A000040. - M. F. Hasler, Nov 08 2018