cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-4 of 4 results.

A008837 a(n) = p*(p-1)/2 for p = prime(n).

Original entry on oeis.org

1, 3, 10, 21, 55, 78, 136, 171, 253, 406, 465, 666, 820, 903, 1081, 1378, 1711, 1830, 2211, 2485, 2628, 3081, 3403, 3916, 4656, 5050, 5253, 5671, 5886, 6328, 8001, 8515, 9316, 9591, 11026, 11325, 12246, 13203, 13861, 14878, 15931, 16290, 18145, 18528, 19306
Offset: 1

Views

Author

Keywords

Comments

Whereas A034953 is the sequence of triangular numbers with prime indices, this is the sequence of triangular numbers with numbers one less than primes for indices. - Alonso del Arte, Aug 17 2014
From Jianing Song, Apr 13 2019: (Start)
a(n) is both the number of quadratic residues and the number of nonresidues modulo prime(n)^2 that are coprime to prime(n).
For k coprime to prime(n), k^a(n) == +-1 (mod prime(n)^2). (End)

Crossrefs

Half the terms of A036689.
Cf. A000217 (triangular numbers), A112456 (least triangular number divisible by n-th prime). - Klaus Brockhaus, Nov 18 2008
Column 1 of A257253. (Row 1 of A257254).

Programs

Formula

a(n) = binomial(prime(n), 2) = A000217(A000040(n)-1). - Enrique Pérez Herrero, Dec 10 2011
a(n) = (1/2)*A072230(A000040(n)). - L. Edson Jeffery, Apr 07 2012
a(n) = (phi(prime(n))^2 + phi(prime(n)))/2, where phi(n) is Euler's totient function, A000010. - Alonso del Arte, Aug 22 2014
a(n) = A036689(n)/2. - Antti Karttunen, May 01 2015
Product_{n>=2} (1 - 1/a(n)) = A271780. - Amiram Eldar, Nov 22 2022

Extensions

Offset changed from 2 to 1 by Harry J. Smith, Jul 25 2009

A175624 a(n) = n! modulo n*(n+1)*(n+2)/3.

Original entry on oeis.org

1, 2, 6, 24, 50, 48, 0, 0, 210, 120, 352, 168, 0, 0, 800, 288, 1122, 360, 0, 0, 2002, 528, 0, 0, 0, 0, 4032, 840, 4930, 960, 0, 0, 0, 0, 8400, 1368, 0, 0, 11440, 1680, 13202, 1848, 0, 0, 17250, 2208, 0, 0, 0, 0, 24752, 2808, 0, 0, 0, 0, 34162, 3480, 37760, 3720, 0, 0, 0, 0
Offset: 1

Views

Author

John W. Layman, Jul 27 2010

Keywords

Comments

It appears that a(1)=1, a(2)=2, a(3)=6, and, for n>3, a(n) = n*(n+2) if n+1 is prime, else a(n) = n*(n+1)*(n+5)/6 if n+2 is prime, else a(n)=0. This has been verified for n up to 1000.

Crossrefs

Programs

  • Magma
    [Factorial(n) mod (2*Binomial(n+2,3)): n in [1..80]]; // G. C. Greubel, Apr 12 2024
    
  • Mathematica
    Table[Mod[(n!), (n^3 + 3 n^2 + 2 n)/3], {n, 100}] (* Vincenzo Librandi, Jul 10 2014 *)
  • PARI
    a(n) = n! % (n*(n+1)*(n+2)/3); \\ Michel Marcus, Jul 09 2014
    
  • SageMath
    [factorial(n)%(2*binomial(n+2,3)) for n in range(1,81)] # G. C. Greubel, Apr 12 2024

A242426 a(n) = floor(n! / n^3).

Original entry on oeis.org

1, 0, 0, 0, 0, 3, 14, 78, 497, 3628, 29990, 277200, 2834328, 31770514, 387459072, 5108103000, 72397196844, 1097800704000, 17735107218083, 304112751022080, 5516784599040000, 105559797875432727, 2124765080865042873, 44881973505008640000, 992717442773183102976
Offset: 1

Views

Author

Alex Ratushnyak, May 14 2014

Keywords

Crossrefs

Cf. A226198 (floor(n!/n^2)).

Programs

  • Python
    import math
    for i in range(1,32): print(math.factorial(i)//(i**3), end=', ')

Formula

a(n) = floor(A000142(n-1) / A000290(n)).

Extensions

Formula corrected by David Radcliffe, Aug 07 2025

A242427 n! mod n^3.

Original entry on oeis.org

0, 2, 6, 24, 120, 72, 238, 384, 567, 800, 110, 0, 2184, 784, 0, 0, 1428, 0, 703, 0, 0, 2904, 4209, 0, 0, 13520, 0, 0, 15109, 0, 18228, 0, 0, 30056, 0, 0, 9546, 14440, 0, 0, 26855, 0, 23994, 0, 0, 25392, 13207, 0, 0, 0, 0, 0, 95453, 0, 0, 0, 0, 148016, 93928, 0, 208315
Offset: 1

Views

Author

Alex Ratushnyak, May 14 2014

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[n!,n^3],{n,80}] (* Harvey P. Dale, Aug 03 2017 *)
  • Python
    import math
    for i in range(1,77): print(math.factorial(i) % (i**3), end=', ')
Showing 1-4 of 4 results.