OFFSET
1,1
COMMENTS
Equivalently, solutions to n'' = 1, since n' = 1 iff n is prime. Twice the lesser of the twin primes, 2*A001359 = A108605, are a subsequence. - M. F. Hasler, Apr 07 2015
All terms are squarefree, because if there would be a prime p whose square p^2 would divide n, then A003415(n) = (A003415(p^2) * (n/p^2)) + (p^2 * A003415(n/p^2)) = p*[(2 * (n/p^2)) + (p * A003415(n/p^2))], which certainly is not a prime. - Antti Karttunen, Oct 10 2019
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10001 (first 1000 terms from Reinhard Zumkeller)
FORMULA
MATHEMATICA
dn[0] = 0; dn[1] = 0; dn[n_?Negative] := -dn[-n]; dn[n_] := Module[{f = Transpose[FactorInteger[n]]}, If[PrimeQ[n], 1, Total[n*f[[2]]/f[[1]]]]]; Select[Range[500], dn[dn[#]] == 1 &] (* T. D. Noe, Mar 07 2013 *)
PROG
(Haskell)
a157037 n = a157037_list !! (n-1)
a157037_list = filter ((== 1) . a010051' . a003415) [1..]
-- Reinhard Zumkeller, Apr 08 2015
(PARI)
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
isA157037(n) = isprime(A003415(n)); \\ Antti Karttunen, Oct 19 2019
(Python)
from itertools import count, islice
from sympy import isprime, factorint
def A157037_gen(): # generator of terms
return filter(lambda n:isprime(sum(n*e//p for p, e in factorint(n).items())), count(2))
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 22 2009
STATUS
approved