OFFSET
1,1
COMMENTS
The sums of the first 10^k terms, for k = 1, 2, ..., are 28, 354, 3596, 36026, 360402, 3604134, 36041392, 360413970, 3604140072, 36041400856, ... . Apparently, the asymptotic mean of this sequence is limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3.604140... . - Amiram Eldar, Sep 10 2022
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(4n+1) = a(4n+2) = 2 for all nonnegative integers n.
a(n) = A053670(n) for all n congruent to 0 or 3 (mod 4).
EXAMPLE
The 11th triangular number is 66 = 2*3*11. 5 is the smallest prime that is coprime to 66, so a(11) = 5.
MAPLE
A135376 := proc(n) local T, p ; T := n*(n+1)/2 ; p := 2 ; while T mod p = 0 do p := nextprime(p) ; od: RETURN(p) ; end: seq(A135376(n), n=1..120) ; # R. J. Mathar, Dec 11 2007
MATHEMATICA
a = {}; For[n = 1, n < 80, n++, j = 1; While[Mod[n*(n + 1)/2, Prime[j]] == 0, j++ ]; AppendTo[a, Prime[j]]]; a (* Stefan Steinerberger, Dec 10 2007 *)
sp[n_]:=Module[{p=2}, While[Mod[n, p]==0, p=NextPrime[p]]; p]; sp[#]&/@ Accumulate[ Range[110]] (* Harvey P. Dale, Jul 26 2018 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Dec 09 2007
EXTENSIONS
More terms from Stefan Steinerberger and R. J. Mathar, Dec 10 2007
STATUS
approved
