OFFSET
1,3
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
MathWorld, Pairing Function
PROG
(PARI)
A001511(n) = (1+valuation(n, 2));
A055396(n) = if(n==1, 0, primepi(factor(n)[1, 1])); \\ This function from Charles R Greathouse IV, Apr 23 2015
for(n=1, 10000, write("b286253.txt", n, " ", A286253(n)));
(Scheme) (define (A286253 n) (* (/ 1 2) (+ (expt (+ (A055396 n) (A001511 (+ 1 n))) 2) (- (A055396 n)) (- (* 3 (A001511 (+ 1 n)))) 2)))
(Python)
from sympy import primepi, isprime, primefactors
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a049084(n): return primepi(n)*(1*isprime(n))
def a055396(n): return 0 if n==1 else a049084(min(primefactors(n)))
def a001511(n): return 2 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
def a(n): return T(a055396(n), a001511(n + 1)) # Indranil Ghosh, May 07 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 07 2017
STATUS
approved