login
a(n) = 1 if A003961(n) is a triangular number, otherwise 0, where A003961 is fully multiplicative with a(p) = nextprime(p).
1

%I #12 Feb 12 2023 15:22:17

%S 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,

%T 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,

%U 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

%N a(n) = 1 if A003961(n) is a triangular number, otherwise 0, where A003961 is fully multiplicative with a(p) = nextprime(p).

%H Antti Karttunen, <a href="/A360130/b360130.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(n) = A010054(A003961(n)).

%e For n = 99 = 9*11, A003961(99) = 325 = 25*13, and 325 is one of the (odd) triangular numbers, A014493, therefore a(99) = 1.

%t 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 *)

%o (PARI)

%o A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };

%o A010054(n) = issquare(8*n + 1);

%o A360130(n) = A010054(A003961(n));

%Y Cf. A003961, A010054, A014493.

%K nonn

%O 1

%A _Antti Karttunen_, Feb 12 2023