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 11-20 of 20 results.

A162604 Primes of the form k^k-k!-9.

Original entry on oeis.org

223, 16736887, 104857597567097991823359991, 11756638905368320778615010897169507936008298389569527
Offset: 1

Views

Author

Keywords

Comments

The values of A036679(k)-9 at indices k=4, 8, 20, 34, ... - R. J. Mathar, Jul 16 2009

Crossrefs

Cf. A162603.

Programs

  • Magma
    [a: n in [3..100] | IsPrime(a) where a is n^n-Factorial(n)-9]; // Vincenzo Librandi, Aug 02 2017
  • Mathematica
    Select[Table[n^n-n!-9,{n,3,50}],PrimeQ] (* Harvey P. Dale, Jul 30 2017 *)

A344116 Triangle read by rows: T(n,k) is the number of relations from an n-element set to a k-element set that are not onto functions.

Original entry on oeis.org

1, 3, 14, 7, 58, 506, 15, 242, 4060, 65512, 31, 994, 32618, 1048336, 33554312, 63, 4034, 261604, 16775656, 1073740024, 68719476016, 127, 16258, 2095346, 268427056, 34359721568, 4398046495984, 562949953416272, 255, 65282, 16771420, 4294926472, 1099511501776, 281474976519136, 72057594037786816, 18446744073709511296
Offset: 1

Views

Author

Mohammad K. Azarian, Jun 07 2021

Keywords

Examples

			For T(2,2), the number of relations is 2^4 and the number of onto functions is 2, so 2^4 - 2 = 14.
Triangle T(n,k) begins:
   1
   3     14
   7     58      506
  15    242     4060      65512
  31    994    32618    1048336    33554312
		

Crossrefs

Programs

  • Mathematica
    TableForm[Table[2^(n*k) - Sum[Binomial[k, k - i] (k - i)^n*(-1)^i, {i, 0, k}], {n, 5}, {k, n}]]
  • PARI
    T(n,k) = 2^(n*k) - k!*stirling(n, k, 2); \\ Michel Marcus, Jun 26 2021

Formula

T(n,k) = 2^(n*k) - k!*Stirling2(n,k).
T(n,k) = A344110(n,k) - A131689(n,k).

A109662 Numbers k such that the sum of the digits of (k^k - k!) is divisible by k.

Original entry on oeis.org

1, 2, 3, 9, 14, 15, 29, 33, 45, 81, 102, 105, 126, 142, 157, 288, 414, 1184, 2133, 10449, 16369, 17221, 46524, 214179, 216741
Offset: 1

Views

Author

Ryan Propper, Aug 06 2005

Keywords

Comments

The quotients are 0, 1, 1, 5, 5, 6, 7, 6, 8, 9, 9, 9, 9, 10, 10, 11, 12, 14, 15, 18, 19, 19, 21, 24, 24.
No more terms < 500000. - Lars Blomberg, Jul 05 2011
a(26) > 595261. - J.W.L. (Jan) Eerland, Nov 05 2024

Examples

			The digits of 414^414 - 414! sum to 4968 and 4968 is divisible by 414, so 414 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Do[s = n^n - n!; k = Plus @@ IntegerDigits[s]; If[Mod[k, n] == 0, Print[n]], {n, 1, 10000}]

Extensions

Terms a(20)-a(25) from Lars Blomberg, Jul 05 2011

A114846 Numbers of the form p^p - p!, where p is a prime.

Original entry on oeis.org

2, 21, 3005, 818503, 285271753811, 302868879571453, 827239906198908668177, 1978419534015213180291979, 20880467973995895295470056270567, 2567686153152369372568088512776472510483469, 17069174130715013119956465106241589193164734431
Offset: 1

Views

Author

Giovanni Teofilatto, Feb 20 2006

Keywords

Comments

Except for the term 2, p^p - p! is equal to the sum of p distinct primes.

Crossrefs

Cf. A036679.

Programs

  • Mathematica
    Table[Prime[n]^Prime[n] - Prime[n]!, {n, 1, 11}] (* Stefan Steinerberger, Feb 21 2006 *)
    Table[p^p-p!,{p,Prime[Range[15]]}] (* Harvey P. Dale, Feb 03 2015 *)

Extensions

More terms from Stefan Steinerberger, Feb 21 2006

A162605 Primes of the form k^k-k!+2.

Original entry on oeis.org

2, 23, 387057611, 7596040312163297274222442578036920783684137730466972969164241364503367485389656454146145546668114950475963285686810192201741431
Offset: 1

Views

Author

Keywords

Comments

The values of A036679(k)+2 at indices k=1, 3, 9, 69, ... - R. J. Mathar, Jul 16 2009
No further terms up to k=1000. - Harvey P. Dale, Apr 26 2022

Crossrefs

Programs

  • Mathematica
    f[n_]:=n^n-n!+2; lst={};Do[p=f[n];If[PrimeQ[p],AppendTo[lst,p]],{n,4*5!}]; lst
    Select[Table[k^k-k!+2,{k,100}],PrimeQ] (* Harvey P. Dale, Apr 26 2022 *)

A344919 a(n) = n^n - n*(n + 1) / 2.

Original entry on oeis.org

1, 0, 1, 21, 246, 3110, 46635, 823515, 16777180, 387420444, 9999999945, 285311670545, 8916100448178, 302875106592162, 11112006825557911, 437893890380859255, 18446744073709551480, 827240261886336764024, 39346408075296537575253, 1978419655660313589123789, 104857599999999999999999790
Offset: 0

Views

Author

Peter Luschny, Jun 19 2021

Keywords

Crossrefs

Programs

Formula

a(n) = Product_{j=1..n} n - Sum_{j=1..n} j.
a(n) = A000312(n) - A000217(n).

A347034 Triangle read by columns: T(n,k) is the number of functions from an n-element set to a k-element set that are not one-to-one, k>=n>=1.

Original entry on oeis.org

0, 0, 2, 0, 3, 21, 0, 4, 40, 232, 0, 5, 65, 505, 3005, 0, 6, 96, 936, 7056, 45936, 0, 7, 133, 1561, 14287, 112609, 818503, 0, 8, 176, 2416, 26048, 241984, 2056832, 16736896, 0, 9, 225, 3537, 43929, 470961, 4601529, 42683841, 387057609, 0, 10, 280, 4960, 69760, 848800
Offset: 1

Views

Author

Mohammad K. Azarian, Aug 28 2021

Keywords

Comments

The formula for this sequence is Theorem 2.2(iv) of the author's paper, p. 131 (see the link).

Examples

			For T(2,3): the number of functions is 3^2 and the number of one-to-one functions is 6, so 3^2 - 6 = 3 and thus T(2,3) = 3.
Triangle T(n,k) begins:
       k=1  k=2   k=3   k=4    k=5     k=6
  n=1:  0    0    0     0      0       0
  n=2:       2    3     4      5       6
  n=3:            21    40     65      96
  n=4:                  232    505     936
  n=5:                         3005    7056
  n=6:                                 45936
		

Crossrefs

Programs

  • Maple
    A347034 := proc(n,k)
        k^n-k!/(k-n)! ;
    end proc:
    seq(seq(A347034(n,k),n=1..k),k=1..12) ; # R. J. Mathar, Jan 12 2023
  • Mathematica
    Table[k^n - k!/(k - n)!, {k, 12}, {n, k}] // Flatten
  • PARI
    T(n,k) = k^n - k!/(k - n)!;
    row(k) = vector(k, i, T(i, k)); \\ Michel Marcus, Oct 01 2021

Formula

T(n,k) = k^n - k!/(k - n)!, k>=n.
T(n,n) = A036679(n).

A359950 a(n) is the greatest prime factor of n^n - n!.

Original entry on oeis.org

2, 7, 29, 601, 29, 116929, 11887, 4778489, 82207, 296987, 2767, 464089, 36922117, 71722471217, 10219277051, 9406703479, 2040247819, 122450719, 1265072927, 18353142818474353, 21514105057, 46999724987, 29693667067, 5684341885088084044195811037649, 692132186353, 12114317049616531
Offset: 2

Views

Author

Sebastian F. Orellana, Jan 19 2023

Keywords

Examples

			a(5) = greatest prime factor of 5^5 - 5! = greatest prime factor of 3125 - 120 = greatest prime factor of 3005 = 3005/5 = 601.
		

Crossrefs

Programs

  • Mathematica
    Table[Max[First/@FactorInteger[n^n-n!]],{n,2,27}] (* Stefano Spezia, Jan 22 2023 *)
  • PARI
    a(n) = vecmax(factor(n^n - n!)[,1]); \\ Michel Marcus, Jan 22 2023

Formula

a(n) = A006530(A036679(n)) = A006530(n*A126130(n-1)).

Extensions

More terms from Michel Marcus, Jan 22 2023

A068983 a(n) = Sum_{k=0..n} (k^k-k!).

Original entry on oeis.org

0, 2, 23, 255, 3260, 49196, 867699, 17604595, 404662204, 10401033404, 295672787215, 9211294233871, 312080173805324, 11423999821072140, 449316582527563515, 18896039733447227131, 846135945932355895308, 40192537618855187742732, 2018612071634068368034711
Offset: 1

Views

Author

Darrell Minor, Apr 02 2002

Keywords

Comments

a(n) = number of non-injective functions [k]->[k] for 1<=k<=n.

Examples

			a(4) = 255 because (1^1-1!)+(2^2-2!)+(3^3-3!)+(4^4-4!) = 255.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[n^n-n!,{n,20}]] (* Harvey P. Dale, Aug 21 2011 *)

Formula

a(n) = Sum_{k=0..n} (k^k-k!).
a(n) = A062970(n) - A003422(n+1). - Alois P. Heinz, Aug 10 2021

A162606 Primes of the form k^k-k!+6.

Original entry on oeis.org

3011, 818509, 827239906198908668183, 3877924263464448622408024944643162574255380546190593937673127995497376385062869
Offset: 1

Views

Author

Keywords

Comments

The values of A036679(k)+6 at indices k=5, 7, 17, 47, 97, 1073, ... - R. J. Mathar, Jul 16 2009

Crossrefs

Programs

  • Mathematica
    f[n_]:=n^n-n!+6; lst={};Do[p=f[n];If[PrimeQ[p],AppendTo[lst,p]],{n,3*5!}]; lst
    Select[Table[n^n-n!+6,{n,50}],PrimeQ] (* Harvey P. Dale, Sep 22 2019 *)
Previous Showing 11-20 of 20 results.