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.

A145829 Square root of squares in A145768 (XOR of squares of the numbers 1..n).

This page as a plain text file.
%I A145829 #20 Dec 17 2021 00:54:18
%S A145829 1,4,1,15,0,16,20,31,16,49,65,224,96,96,337,144,720,400,945,625,928,
%T A145829 828,367,928,1889,624,2609,3568,3568,2064,10273,1040,545,12384,12639,
%U A145829 56800,25812,15119,36,864,144383,146463,195440,61391,61072,61072,58128,25872
%N A145829 Square root of squares in A145768 (XOR of squares of the numbers 1..n).
%H A145829 Reinhard Zumkeller, <a href="/A145829/b145829.txt">Table of n, a(n) for n = 1..63</a>
%t A145829 an = 0; Reap[ For[i = 1, i <= 10^6, i++, an = BitXor[an, i^2]; If[IntegerQ[r = Sqrt[an]], Print[r]; Sow[r]]]][[2, 1]] (* _Jean-François Alcover_, Oct 11 2013, translated from Pari *)
%o A145829 (PARI) an=0; for( i=1,10^4, an=bitxor(an,i^2); issquare(an,&an) && print1(an","))
%o A145829 (Haskell)
%o A145829 a145829 n = a145829_list !! (n-1)
%o A145829 a145829_list = map a000196 $ filter ((== 1) . a010052) $ tail a145768_list
%o A145829 -- _Reinhard Zumkeller_, Nov 09 2012
%o A145829 (Python)
%o A145829 from itertools import count, islice
%o A145829 from sympy import integer_nthroot
%o A145829 def A145829gen(): # generator of terms
%o A145829     m = 0
%o A145829     for n in count(1):
%o A145829         m ^= n**2
%o A145829         a, b = integer_nthroot(m,2)
%o A145829         if b: yield a
%o A145829 A145829_list = list(islice(A145829gen(),20)) # _Chai Wah Wu_, Dec 16 2021
%Y A145829 a(n) = A000196( A145828(n)) = A000196( A145768( A145827(n))); A145828 = { a(n)^2 } = A145768 intersect A000290.
%K A145829 easy,nice,nonn
%O A145829 1,2
%A A145829 _M. F. Hasler_, Oct 20 2008