login
A360130
a(n) = 1 if A003961(n) is a triangular number, otherwise 0, where A003961 is fully multiplicative with a(p) = nextprime(p).
1
1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0
OFFSET
1
FORMULA
a(n) = A010054(A003961(n)).
EXAMPLE
For n = 99 = 9*11, A003961(99) = 325 = 25*13, and 325 is one of the (odd) triangular numbers, A014493, therefore a(99) = 1.
MATHEMATICA
f[p_, e_] := NextPrime[p]^e; a[n_] := If[IntegerQ[Sqrt[8*Times @@ f @@@ FactorInteger[n] + 1]], 1, 0]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Feb 12 2023 *)
PROG
(PARI)
A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
A010054(n) = issquare(8*n + 1);
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Feb 12 2023
STATUS
approved