

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

T. D. Noe, Table of n, a(n) for n = 1..1000
C. C. Yen (Proposer), E. P. Starke (Solver), Problem 272, Amer. Math. Monthly, 41 (1934), 582587.
C. C. Yen (Proposer), E. P. Starke (Solver), Problem 272, Amer. Math. Monthly, 41 (1934), 582587. [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

Cf. A000292.
Sequence in context: A318556 A292148 A125266 * A282016 A238848 A117494
Adjacent sequences: A002013 A002014 A002015 * A002017 A002018 A002019


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane.


EXTENSIONS

More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Oct 24 2004


STATUS

approved



