login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Cf. A000292.
Sequence in context: A318556 A292148 A125266 * A282016 A238848 A117494
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Gabriel Cunningham (gcasey(AT)mit.edu), Oct 24 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)