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.

Previous Showing 61-70 of 91 results. Next

A277081 Irregular triangle read by rows: T(n,k) = number of size k subsets of S_n that remain unchanged under the operation of replacing a permutation with its inverse.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 4, 7, 8, 7, 4, 1, 1, 10, 52, 190, 546, 1302, 2660, 4754, 7535, 10692, 13672, 15820, 16604, 15820, 13672, 10692, 7535, 4754, 2660, 1302, 546, 190, 52, 10, 1, 1, 26, 372, 3822, 31306, 216086, 1300420, 6981650, 33992275, 151945820
Offset: 0

Views

Author

Christian Bean, Sep 28 2016

Keywords

Comments

T(n,k) is the number of size k subsets of S_n that remain unchanged under the operation of replacing a permutation with its inverse.

Examples

			For n = 3 and k = 3 the subsets unchanged by inverse are {213,132,123}, {321,132,123}, {321,213,123}, {231,312,123}, {321,132,213}, {132,312,231},{213,312,231}, {321,231,312} hence T(3,3) = 8. (Here we are using the one-line notation for permutations, not the product of cycles form.)
Triangle starts:
1, 1;
1, 1;
1, 2, 1;
1, 4, 7, 8, 7, 4, 1;
		

Crossrefs

Row lengths give A038507.
Cf. A000085.

Programs

  • PARI
    \\ here b(n) is A000085(n).
    b(n)={sum(k=0, n\2, n!/((n-2*k)!*2^k*k!))}
    Row(n)={my(t=b(n)); vector(n!+1, k, k--; sum(i=0, k\2, binomial((n!-t)/2, i)*binomial(t, k-2*i)))}
    { for(n=0, 4, print(Row(n))) } \\ Andrew Howroyd, Feb 03 2021

Formula

T(n,k) = Sum( C((n! - I(n))/2, i)*C(I(n), k - 2*i) for i in [0..floor(k/2)]) where I(n) = A000085(n).

A301316 a(n) = ((n-1)! + 1) mod n^2.

Original entry on oeis.org

0, 2, 3, 7, 0, 13, 35, 49, 64, 81, 11, 1, 0, 57, 1, 1, 85, 1, 38, 1, 1, 133, 184, 1, 1, 521, 1, 1, 522, 1, 589, 1, 1, 885, 1, 1, 259, 381, 1, 1, 656, 1, 559, 1, 1, 553, 282, 1, 1, 1, 1, 1, 1802, 1, 1, 1, 1, 2553, 1593, 1, 3416, 993, 1, 1, 1, 1, 804
Offset: 1

Views

Author

Stanislav Sykora, Mar 18 2018

Keywords

Comments

By definition, when n > 1, a(n) = 0 then n is a Wilson prime (A007540).
For a(n) to equal 1, (n-1)! must be divisible by n^2 which is the prevailing case for large n. For example, all n which are a product of more than two distinct primes belong to this category. So do all proper powers of primes except 2^2, 2^3, and 3^2. Obviously, when a(n) = 1, then also A055976(n) = 1.
The cases of a(n) > 1 include, for example, all primes other than Wilson's and all numbers of the form n=2*p, where p is a prime.

Examples

			From _Muniru A Asiru_, Mar 20 2018: (Start)
((1-1)! + 1) mod 1^2 = (0! +1) mod 1 = 2 mod 1 = 0.
((2-1)! + 1) mod 2^2 = (1! +1) mod 4 = 2 mod 4 = 2.
((3-1)! + 1) mod 3^2 = (2! +1) mod 9 = 3 mod 9 = 3.
((4-1)! + 1) mod 4^2 = (3! +1) mod 16 = 7 mod 16 = 7.
((5-1)! + 1) mod 5^2 = (4! +1) mod 25 = 25 mod 25 = 0.
... (End)
		

Crossrefs

Programs

  • GAP
    List([1..60],n->(Factorial(n-1)+1) mod n^2); # Muniru A Asiru, Mar 20 2018
  • Maple
    seq((factorial(n-1)+1) mod n^2,n=1..60); # Muniru A Asiru, Mar 20 2018
  • Mathematica
    Array[Mod[(# - 1)! + 1, #^2] &, 67] (* Michael De Vlieger, Apr 21 2018 *)
  • PARI
    a(n) = ((n-1)! + 1) % n^2; \\ Michel Marcus, Mar 18 2018
    

Formula

a(n) = ((n-1)! + 1) mod n^2. - Jon E. Schoenfield, Mar 18 2018
a(n) = A038507(n-1) mod A000290(n). - Michel Marcus, Mar 20 2018

A301317 a(n) = (n-1)! + 1 mod n^3.

Original entry on oeis.org

0, 2, 3, 7, 25, 121, 35, 433, 226, 881, 495, 1, 676, 1233, 2701, 2049, 4420, 1, 4009, 1, 2647, 6425, 4945, 1, 626, 15393, 1, 1, 13137, 1, 21731, 1, 13069, 2041, 1, 1, 23532, 19153, 50194, 1, 14104, 1, 41237, 1, 1, 76729, 86433, 1, 1, 1, 78031, 1, 77645
Offset: 1

Views

Author

Stanislav Sykora, Mar 18 2018

Keywords

Comments

There is no known number n > 1 for which a(n)=0.
For a(n) to equal 1, (n-1)! must be divisible by n^3 which tends to be the most frequent case for large n. For example, all n which are a product of three or more distinct primes belong to this category. So do all proper powers of primes except 2^2, 2^3, 2^4, 3^2, and 5^2.
Obviously, when a(n) = 1, then also A055976(n) = 1 and A301316(n) = 1.
If n is prime, a(n) is divisible by n. - Robert Israel, Mar 20 2018

Examples

			From _Muniru A Asiru_, Mar 20 2018: (Start)
((1-1)! + 1) mod 1^3 = (0! +1) mod 1 = 2 mod 1 = 0.
((2-1)! + 1) mod 2^3 = (1! +1) mod 8 = 2 mod 8 = 2.
((3-1)! + 1) mod 3^3 = (2! +1) mod 27 = 3 mod 27 = 3.
((4-1)! + 1) mod 4^3 = (3! +1) mod 64 = 7 mod 64 = 7.
((5-1)! + 1) mod 5^3 = (4! +1) mod 125 = 25 mod 125 = 25.
... (End)
		

Crossrefs

Programs

  • GAP
    List([1..60],n->(Factorial(n-1)+1) mod n^3); # Muniru A Asiru, Mar 20 2018
  • Maple
    seq((factorial(n-1)+1) mod n^3,n=1..60); # Muniru A Asiru, Mar 20 2018
  • Mathematica
    Array[Mod[(# - 1)! + 1, #^3] &, 53] (* Michael De Vlieger, Mar 19 2018 *)
  • PARI
    a(n) = ((n-1)! + 1) % n^3; \\ Michel Marcus, Mar 18 2018
    

Formula

a(n) = ((n-1)! + 1) mod n^3. - Jon E. Schoenfield, Mar 18 2018
a(n) = A038507(n-1) mod A000578(n). - Michel Marcus, Mar 20 2018

A301523 Integers which can be partitioned into two distinct factorials. 0! and 1! are not considered distinct.

Original entry on oeis.org

3, 7, 8, 25, 26, 30, 121, 122, 126, 144, 721, 722, 726, 744, 840, 5041, 5042, 5046, 5064, 5160, 5760, 40321, 40322, 40326, 40344, 40440, 41040, 45360, 362881, 362882, 362886, 362904, 363000, 363600, 367920, 403200, 3628801, 3628802, 3628806, 3628824, 3628920, 3629520, 3633840, 3669120, 3991680
Offset: 1

Views

Author

Seiichi Manyama, Mar 23 2018

Keywords

Comments

Numbers of the form i! + j! where i > j > 0. - Altug Alkan, Mar 23 2018
Primes in this sequence are A088332(n) for n > 1.

Examples

			    + |   1    2    6   24
  ----+--------------------
    1 |
    2 |   3;
    6 |   7,   8;
   24 |  25,  26,  30;
  120 | 121, 122, 126, 144;
		

Crossrefs

Programs

  • Mathematica
    Union[Total/@Subsets[Range[10]!,{2}]] (* Harvey P. Dale, Aug 25 2020 *)

A358280 a(n) = Sum_{d|n} (d-1)!.

Original entry on oeis.org

1, 2, 3, 8, 25, 124, 721, 5048, 40323, 362906, 3628801, 39916930, 479001601, 6227021522, 87178291227, 1307674373048, 20922789888001, 355687428136444, 6402373705728001, 121645100409194912, 2432902008176640723, 51090942171713068802, 1124000727777607680001
Offset: 1

Views

Author

Seiichi Manyama, Nov 08 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, (# - 1)! &]; Array[a, 23] (* Amiram Eldar, Aug 30 2023 *)
  • PARI
    a(n) = sumdiv(n, d, (d-1)!);
    
  • PARI
    my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, (k-1)!*x^k/(1-x^k)))

Formula

G.f.: Sum_{k>0} (k-1)! * x^k/(1 - x^k).
If p is prime, a(p) = 1 + (p-1)!.

A362777 Triangular array read by rows: T(n,k) = n!*k + 1, n >= 1, 1 <= k <= n.

Original entry on oeis.org

2, 3, 5, 7, 13, 19, 25, 49, 73, 97, 121, 241, 361, 481, 601, 721, 1441, 2161, 2881, 3601, 4321, 5041, 10081, 15121, 20161, 25201, 30241, 35281, 40321, 80641, 120961, 161281, 201601, 241921, 282241, 322561, 362881, 725761, 1088641, 1451521, 1814401, 2177281, 2540161, 2903041, 3265921
Offset: 1

Views

Author

Joe B. Stephen, May 03 2023

Keywords

Comments

These numbers are used in a simple proof of the infinitude of the primes: n!*i + 1 and n!*j + 1 are coprime for 1 <= i < j <= n, so for any n we get n coprime integers (greater than 1) and hence we get at least n distinct primes.

Examples

			Triangle T(n,k) begins:
  n\k  1    2    3    4    5    6 ...
  1    2
  2    3    5
  3    7   13   19
  4   25   49   73   97
  5  121  241  361  481  601
  6  721 1441 2161 2881 3601 4321
  ...
		

Crossrefs

Cf. A038507 (1st column), A188914 (right diagonal).

A366758 a(n) is the sum of the divisors of n!+1.

Original entry on oeis.org

3, 3, 4, 8, 31, 133, 832, 5113, 41044, 388800, 3958704, 39916802, 518682390, 6302045232, 90968651712, 1332614649600, 22844265373440, 356226551466344, 7504470340300800, 123358411682195904, 2432902126073962432, 52279222588118377280, 1175121515279802150144
Offset: 0

Views

Author

Sean A. Irvine, Oct 20 2023

Keywords

Examples

			a(5) = 133 because the divisors of 5!+1 are {1, 11, 121}.
		

Crossrefs

Programs

  • Maple
    a:=n->numtheory[sigma](n!+1):
    seq(a(n), n=0..30);
  • Mathematica
    DivisorSigma[1,Range[0,25]!+1] (* Paolo Xausa, Oct 21 2023 *)
  • Python
    from math import factorial
    from sympy import divisor_sigma
    def A366758(n): return divisor_sigma(factorial(n)+1) # Chai Wah Wu, Oct 20 2023

Formula

a(n) = sigma(n!+1) = A000203(A038507(n)).

A366760 a(n) = phi(n!+1), where phi is Euler's totient function (A000010).

Original entry on oeis.org

1, 1, 2, 6, 20, 110, 612, 4970, 39600, 337680, 3298900, 39916800, 442155168, 6151996372, 83387930692, 1282826630160, 19089488332800, 355148307803520, 5427568925856000, 119931789135468100, 2432901890279317572, 49902667163053013232, 1073067539495604750240
Offset: 0

Views

Author

Sean A. Irvine, Oct 20 2023

Keywords

Crossrefs

Programs

  • Mathematica
    EulerPhi[Range[0,25]!+1] (* Paolo Xausa, Oct 21 2023 *)
  • PARI
    {a(n) = eulerphi(n!+1)}
    
  • Python
    from math import factorial
    from sympy import totient
    def A366760(n): return totient(factorial(n)+1) # Chai Wah Wu, Oct 20 2023

Formula

a(n) = A000010(A038507(n)).

A064011 Sum of distinct primes dividing n! + 1.

Original entry on oeis.org

2, 3, 7, 5, 11, 110, 71, 722, 359, 329902, 39916801, 2834342, 75024430, 3790360510, 46271879, 1059865, 1538931, 123611150, 1713311273363902, 117897322430, 2703876255255, 93799610095770191, 148139754736864717
Offset: 1

Views

Author

Jason Earls, Sep 07 2001

Keywords

Examples

			a(6) = 110 since 6! + 1 = 721 = 7 * 103 and 7 + 103 = 110.
		

Crossrefs

Programs

  • Mathematica
    sopf[n_] := Plus @@ First @ Transpose @ FactorInteger[n]; sopf /@ Table[n! + 1 ,{n, 1, 23}] (* Amiram Eldar, Feb 03 2020 *)
  • PARI
    sopf(n,s,fac,i)=fac=factor(n); for(i=1,matsize(fac)[1], s=s+fac[i,1]); return(s);
    for(n=1,23,print(sopf(n!+1)))
    
  • PARI
    sopf(n)= { local(f,s=0); f=factor(n); for(i=1, matsize(f)[1], s+=f[i, 1]); return(s) }
    { for (n=1, 60, write("b064011.txt", n, " ", sopf(n! + 1)) ) } \\ Harry J. Smith, Sep 06 2009

Formula

a(n) = A008472(A038507(n)). - Amiram Eldar, Feb 03 2020

A067241 Numbers k such that gcd((2*k)!+1, k!+1) > 1.

Original entry on oeis.org

3, 5, 8, 9, 21, 23, 33, 39, 51, 63, 65, 81, 89, 95, 99, 113, 131, 173, 183, 191, 209, 215, 221, 239, 245, 251, 261, 281, 285, 299, 303, 309, 315, 341, 345, 363, 369, 371, 393, 411, 419, 431, 443, 473, 495, 509, 525, 543, 545, 561, 575, 593, 645, 659, 683, 711
Offset: 1

Views

Author

Benoit Cloitre, Feb 20 2002

Keywords

Crossrefs

Programs

  • Mathematica
    q[k_] := !CoprimeQ[(2*k)!+1, k!+1]; Select[Range[720], q] (* Amiram Eldar, May 01 2025 *)
  • PARI
    isok(k) = gcd((2*k)!+1, k!+1) > 1; \\ Amiram Eldar, May 01 2025
Previous Showing 61-70 of 91 results. Next