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.

A286386 Compound filter: a(n) = 2*A286473(n) + (1 if n is a square, 0 otherwise).

This page as a plain text file.
%I A286386 #8 May 14 2017 15:54:30
%S A286386 3,12,14,21,10,28,14,36,31,44,14,52,10,60,46,69,10,76,14,84,62,92,14,
%T A286386 100,43,108,78,116,10,124,14,132,94,140,58,149,10,156,110,164,10,172,
%U A286386 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
%N A286386 Compound filter: a(n) = 2*A286473(n) + (1 if n is a square, 0 otherwise).
%H A286386 Antti Karttunen, <a href="/A286386/b286386.txt">Table of n, a(n) for n = 1..10000</a>
%F A286386 a(n) = 2*A286473(n) + A010052(n).
%o A286386 (Scheme) (define (A286386 n) (+ (* 2 (A286473 n)) (A010052 n)))
%o A286386 (Python)
%o A286386 from sympy import sqrt, divisors, primefactors
%o A286386 import math
%o A286386 def a010052(n): return 1 if n<1 else int(math.floor(sqrt(n))) - int(math.floor(sqrt(n - 1)))
%o A286386 def a286473(n): return 1 if n==1 else 4*divisors(n)[-2] + (min(primefactors(n))%4)
%o A286386 def a(n): return 2*a286473(n) + a010052(n) # _Indranil Ghosh_, May 14 2017
%Y A286386 Cf. A000290 (gives the positions off odd terms), A010052, A286473, A286366, A286388.
%K A286386 nonn
%O A286386 1,1
%A A286386 _Antti Karttunen_, May 13 2017