OFFSET
1,3
COMMENTS
From Gus Wiseman, Apr 06 2019: (Start)
Also the number of squares in the Young diagram of the integer partition with Heinz number n that are graph-distance 1 from the lower-right boundary, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k). For example, the partition (6,5,5,3) with Heinz number 7865 has diagram
o o o o o o
o o o o o
o o o o o
o o o
with inner rim
o
o
o o
o o o
of size 7, so a(7867) = 7.
(End)
LINKS
FORMULA
a(1) = 0, a(2) = 1, after which, a(n) = a(n/2) if n is of the form 4k+2, and otherwise a(n) = 1+a(A252463(n)) .
For n > 1, a(n) = 1+A033265(A156552(n)) = 1+A297167(n) = A046660(n) + A061395(n). - Last two sums added by Antti Karttunen, Sep 02 2018
Other identities. For all n >= 1:
a(A000040(n)) = n. [Each n occurs for the first time at the n-th prime.]
MATHEMATICA
Table[If[n==1, 0, PrimePi[FactorInteger[n][[-1, 1]]]+PrimeOmega[n]-PrimeNu[n]], {n, 100}] (* Gus Wiseman, Apr 06 2019 *)
PROG
(PARI)
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
\\ More complex way, after Moebius transform:
(Scheme, with memoization-macro definec)
CROSSREFS
One more than A297167 (after the initial term).
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 26 2017
STATUS
approved