login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286366 Compound filter: a(n) = 2*A286365(n) + floor(A072400(n)/4). 8
4, 6, 8, 4, 13, 11, 9, 6, 28, 14, 8, 8, 13, 11, 21, 4, 12, 30, 8, 13, 65, 11, 9, 11, 40, 14, 116, 9, 13, 23, 9, 6, 64, 14, 20, 28, 13, 11, 21, 14, 12, 66, 8, 8, 49, 11, 9, 8, 28, 42, 20, 13, 13, 119, 21, 11, 64, 14, 8, 21, 13, 11, 269, 4, 84, 66, 8, 12, 65, 23, 9, 30, 12, 14, 56, 8, 65, 23, 9, 13, 484, 14, 8, 65, 85, 11, 21, 11, 12, 50, 20, 9, 65, 11, 21, 11 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Each term of this sequence contains, in addition to the information contained in A286365 (which packs the values of A286361(n) and A286363(n) and parity of the exponent of the highest power of 2 dividing n) also the bit-2 of A072400(n) (its third least significant bit), which is here stored as the least significant bit of a(n). Note that the whole A072400(n) can be recovered based on the other information contained in a(n). Together all this information is enough - by Lagrange's "Four Squares theorem" - to determine what is the least number of squares that add up to n. Thus it follows that for all i, j: a(i) = a(j) => A002828(i) = A002828(j).
A286369 is similar, but without the parity of the 2-adic value present.
LINKS
FORMULA
a(n) = 2*A286365(n) + floor(A072400(n)/4).
PROG
(Scheme) (define (A286366 n) (+ (* 2 (A286365 n)) (floor->exact (/ (A072400 n) 4))))
(Python)
from sympy import factorint
from operator import mul
def P(n):
f = factorint(n)
return sorted([f[i] for i in f])
def a046523(n):
x=1
while True:
if P(n) == P(x): return x
else: x+=1
def A(n, k):
f = factorint(n)
return 1 if n == 1 else reduce(mul, [1 if i%4==k else i**f[i] for i in f])
def T(n, m): return ((n + m)**2 - n - 3*m + 2)/2
def a286364(n): return T(a046523(n/A(n, 1)), a046523(n/A(n, 3)))
def a007814(n): return 1 + bin(n - 1)[2:].count("1") - bin(n)[2:].count("1")
def a286365(n): return 2*a286364(n) + a007814(n)%2
def a072400(n): return int(str(int(''.join(map(str, digits(n, 4)[1:]))[::-1]))[::-1], 4)%8
def a(n): return 2*a286365(n) + int(a072400(n)/4) # Indranil Ghosh, May 09 2017
CROSSREFS
Sequence in context: A071851 A083256 A083257 * A331059 A201336 A244850
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 08 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 04:02 EDT 2024. Contains 371696 sequences. (Running on oeis4.)