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!)
A220689 Triangular numbers generated in A224218. That is, the triangular numbers generated by the operation triangular(i) XOR triangular(i+1) along increasing i. 3
1, 21, 21, 105, 105, 105, 105, 946, 946, 666, 1653, 666, 1378, 946, 1225, 946, 4005, 1378, 4005, 1378, 7381, 1225, 1378, 1653, 2485, 4005, 31125, 4005, 4005, 4005, 2485, 13861, 13861, 5356, 4005, 7381, 5356, 5356, 7381, 4005, 5356, 29161, 12561, 12561, 4186, 4186, 4186, 4186 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A000217(A224218(n)) XOR A000217(A224218(n)+1).
MAPLE
read("transforms") ;
A220689 := proc(n)
i := A224218(n) ;
XORnos(A000217(i), A000217(i+1)) ;
end proc: # R. J. Mathar, Apr 23 2013
MATHEMATICA
nmax = 100;
pmax = 2 nmax^2; (* increase coeff 2 if A224218 is too short *)
A224218 = Join[{0}, Flatten[Position[Partition[Accumulate[Range[pmax]], 2, 1], _?(OddQ[Sqrt[1 + 8 BitXor[#[[1]], #[[2]]]]]&), {1}, Heads -> False]]];
a[n_] := Module[{i}, i = A224218[[n]]; BitXor[PolygonalNumber[i], PolygonalNumber[i+1]]];
Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Aug 07 2023, after Harvey P. Dale in A224218 *)
PROG
(Python)
def rootTriangular(a):
sr = 1<<33
while a < sr*(sr+1)//2:
sr>>=1
b = sr>>1
while b:
s = sr+b
if a >= s*(s+1)//2:
sr = s
b>>=1
return sr
for i in range(1<<12):
s = (i*(i+1)//2) ^ ((i+1)*(i+2)//2)
t = rootTriangular(s)
if s == t*(t+1)//2:
print(str(s), end=', ')
CROSSREFS
Sequence in context: A371100 A048245 A246034 * A056485 A056475 A219913
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Apr 13 2013
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 25 13:12 EDT 2024. Contains 371969 sequences. (Running on oeis4.)