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.

A353704 Repdigit numbers (A010785) in A157037.

Original entry on oeis.org

6, 22, 66, 222, 555, 3333, 55555, 66666, 111111, 7777777, 2222222222, 5555555555, 55555555555555555, 2222222222222222222222222, 55555555555555555555555555, 66666666666666666666666666, 66666666666666666666666666666666666, 6666666666666666666666666666666666666666666
Offset: 1

Views

Author

Marius A. Burtea, May 08 2022

Keywords

Comments

Intersection of A010785 and A157037.
No term contains the digits 4, 8 or 9.

Examples

			22 = A010785(11) and 22 = A157037(3), so 22 is a term.
66 = A010785(15) and 22 = A157037(8), so 66 is a term.
		

Crossrefs

Programs

  • Magma
    f:=func;  [n:n in [(k - 9*Floor((k-1)/9))*(10^Floor((k+8)/9) - 1) div 9:k in [1..400]]| IsPrime(Floor(f(n))) ];
    
  • Mathematica
    d[0] = d[1] = 0; d[n_] := n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); Select[Sort[Flatten[Outer[Times, Range[1, 9], (10^Range[43] - 1)/9]]], PrimeQ[d[#]] &] (* Amiram Eldar, May 09 2022 *)
  • PARI
    ad(n) = vecsum([n/f[1]*f[2]|f<-factor(n+!n)~]); \\ A003415
    isok(m) = isprime(ad(m)) && (#Set(digits(m)) == 1); \\ Michel Marcus, May 09 2022
    
  • Python
    from itertools import count, islice
    from sympy import isprime, factorint
    def A353704_gen(): # generator of terms
        return filter(lambda n:isprime(sum(n*e//p for p,e in factorint(n).items())), (d*(10**l-1)//9 for l in count(1) for d in (1,2,3,5,6,7)))
    A353704_list = list(islice(A353704_gen(),10)) # Chai Wah Wu, Jun 23 2022