login
A286386
Compound filter: a(n) = 2*A286473(n) + (1 if n is a square, 0 otherwise).
2
3, 12, 14, 21, 10, 28, 14, 36, 31, 44, 14, 52, 10, 60, 46, 69, 10, 76, 14, 84, 62, 92, 14, 100, 43, 108, 78, 116, 10, 124, 14, 132, 94, 140, 58, 149, 10, 156, 110, 164, 10, 172, 14, 180, 126, 188, 14, 196, 63, 204, 142, 212, 10, 220, 90, 228, 158, 236, 14, 244, 10, 252, 174, 261, 106, 268, 14, 276, 190, 284, 14, 292, 10, 300, 206, 308, 94, 316, 14, 324, 223
OFFSET
1,1
LINKS
FORMULA
a(n) = 2*A286473(n) + A010052(n).
PROG
(Scheme) (define (A286386 n) (+ (* 2 (A286473 n)) (A010052 n)))
(Python)
from sympy import sqrt, divisors, primefactors
import math
def a010052(n): return 1 if n<1 else int(math.floor(sqrt(n))) - int(math.floor(sqrt(n - 1)))
def a286473(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4)
def a(n): return 2*a286473(n) + a010052(n) # Indranil Ghosh, May 14 2017
CROSSREFS
Cf. A000290 (gives the positions off odd terms), A010052, A286473, A286366, A286388.
Sequence in context: A222711 A176796 A242130 * A032918 A039945 A227302
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 13 2017
STATUS
approved