|
|
A002016
|
|
Number of first n tetrahedral numbers (A000292) that are relatively prime to n.
(Formerly M2212 N0878)
|
|
1
|
|
|
1, 1, 3, 1, 2, 2, 4, 2, 6, 1, 8, 2, 10, 2, 5, 4, 14, 3, 16, 2, 7, 4, 20, 4, 10, 5, 18, 4, 26, 2, 28, 8, 16, 7, 8, 6, 34, 8, 20, 4, 38, 3, 40, 8, 12, 10, 44, 8, 28, 5, 30, 10, 50, 9, 16, 8, 33, 13, 56, 5, 58, 14, 24, 16, 20, 8, 64, 14, 41, 4, 68, 12, 70, 17, 19
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
REFERENCES
|
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
C. C. Yen (Proposer), E. P. Starke (Solver), Problem 272, Amer. Math. Monthly, 41 (1934), 582-587.
C. C. Yen (Proposer), E. P. Starke (Solver), Problem 272, Amer. Math. Monthly, 41 (1934), 582-587. [Annotated scanned copy]
|
|
FORMULA
|
a(n) = number of b(1), ..., b(n) that are relatively prime to n, where b() = A000292().
|
|
EXAMPLE
|
All 3 of 1, 4, 10 are prime to 3, so a(3) = 3.
|
|
MATHEMATICA
|
f[n_] := Length@ Select[ Accumulate@ Rest@ FoldList[Plus, 0, Range@ n], GCD[#, n] == 1 &]; Array[f, 83] (* Gabriel Cunningham, Oct 24 2004 *)
|
|
PROG
|
(PARI) a(n) = sum(k=1, n, gcd(k*(k+1)*(k+2)/6, n) == 1); \\ Michel Marcus, Jun 06 2019
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Oct 24 2004
|
|
STATUS
|
approved
|
|
|
|