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 31-40 of 42 results. Next

A108495 a(n) = (n^7 - n)/6.

Original entry on oeis.org

0, 0, 21, 364, 2730, 13020, 46655, 137256, 349524, 797160, 1666665, 3247860, 5971966, 10458084, 17568915, 28476560, 44739240, 68389776, 102036669, 148978620, 213333330, 300181420, 415726311, 567470904, 764411900, 1017252600
Offset: 0

Views

Author

Henry Bottomley, Jun 06 2005

Keywords

Comments

Also integer sequences for (n^2-n)/1 (A002378 offset), (n^3-n)/2 (A027480 offset), (n^43-n)/42 (A108496) and (n^1807-n)/1806.

Examples

			a(2) = (2^7 - 2)/6 = 126/6 = 21.
		

Crossrefs

Programs

  • Magma
    [(n^7-n)/6: n in [0..40]]; // Vincenzo Librandi, May 02 2011
    
  • Mathematica
    Table[(n^7-n)/6,{n,0,30}] (* or *) LinearRecurrence[ {8,-28,56,-70,56,-28,8,-1},{0,0,21,364,2730,13020,46655,137256},30] (* Harvey P. Dale, Apr 16 2014 *)
  • Python
    [(n**7-n)//6 for n in range(41)] # David Radcliffe, Jun 06 2025

Formula

a(n) = (n-1)*A059721(n) = -A024004(n)*n/6.
G.f.: 7*x^2*(3 + 28*x + 58*x^2 + 28*x^3 + 3*x^4)/(1-x)^8. [Colin Barker, May 08 2012]

A108496 a(n) = (n^43 - n)/42.

Original entry on oeis.org

0, 0, 209430786243, 7815642080822311372, 1842172677508006361457030, 27068294695622864223661876860, 68747114771196346634599779308105, 51995580380757061883555053636996008
Offset: 0

Views

Author

Henry Bottomley, Jun 06 2005

Keywords

Comments

Also integer sequences for (n^2-n)/1 (A002378 offset), (n^3-n)/2 (A027480 offset), (n^7-n)/6 (A108495) and (n^1807-n)/1806.

Examples

			a(2) = (2^43 - 2)/42 = 8796093022206/42 = 209430786243.
		

Crossrefs

Programs

Formula

a(n) = (n-1)*A108048(n).

A108498 Triangle read by rows: T(n,k) = sum_i{1<=i<=n} k^i mod n, showing 1<=k<=n.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 0, 0, 6, 0, 4, 0, 2, 0, 0, 0, 5, 3, 0, 2, 6, 0, 8, 0, 0, 6, 2, 0, 0, 0, 6, 2, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 6, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 6, 12, 6, 2, 0, 0, 0, 6, 12, 6, 2
Offset: 1

Views

Author

Henry Bottomley, Jun 06 2005

Keywords

Examples

			Rows start: 0; 0,0; 0,2,0; 0,2,0,0; 0,2,3,4,0; 0,0,0,0,0,0; 0,2,3,4,5,6,0; etc.
T(7,3) = 3+9+27+81+243+729+2187 mod 7 = 3279 mod 7 = 3.
		

Crossrefs

Formula

T(n, k+n)=T(n, k). T(n, 0)=T(n, 1)=T(n, n)=T(1, k)=T(2, k)=T(6, k)=T(42, k)=T(1806, k)=0. T(p, k)=k for p prime and 1

A182398 a(n) = (Sum_{k=1..2n} k^2n) mod 2n.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 7, 8, 3, 6, 11, 4, 13, 14, 5, 16, 17, 6, 19, 12, 1, 22, 23, 8, 25, 26, 9, 28, 29, 58, 31, 32, 11, 34, 35, 12, 37, 38, 13, 24, 41, 2, 43, 44, 15, 46, 47, 16, 49, 30, 17, 52, 53, 18, 45, 56, 19, 58, 59, 116, 61, 62, 3, 64, 65, 22, 67, 68, 23
Offset: 1

Author

Michel Lagneau, Apr 27 2012

Keywords

Comments

Sum_{k=1..n} k^n (mod n) = 0 if n odd.
Properties of this sequence:
a(n) = 1 for n = 1, 3, 21, 903, ...
a(n) = n if n not divisible by 3;
a(3*n) = n except for n = 7, 10, 14, 20, 21, 26, 28, 30, 35, ...
a(21*n) = n, except for n = 10, 20, 26, 30, 40, 43, 50, 52, ...
a(903*n) = n, except for n = 10, ....
It appears that a(A007018(n)/2) = 1 and conjecturally a(m*A007018(n)/2) = m for a majority of value m.
No, a(A007018(n)/2) <> 1 for n > 4. (For example, a(A007018(5)/2) = a(1631721) = 1807.) - Jonathan Sondow, Oct 18 2013
0 < a(n) < 10 for n: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 21, 24, 27, 42, 63, 84, 105, 126, 147, 168, 189, 903, 1806, 2709, 3612, 4515, 5418, 6321, 7224, 8127, .... Search limit was 25000. - Robert G. Wilson v, Jun 18 2015

Crossrefs

Programs

  • Maple
    for n from 1 to 100 do: s:=sum('k^(2*n)', 'k'=1..2*n)
    : x:=irem(s,2*n): printf(`%d, `,x):od:
    # second Maple program:
    a:= n-> add(k&^(2*n) mod (2*n), k=1..2*n) mod (2*n):
    seq(a(n), n=1..100);
  • Mathematica
    Table[Mod[Total[PowerMod[Range[2*n], 2*n, 2*n]], 2*n], {n, 100}] (* T. D. Noe, Apr 28 2012 *)

Formula

a(n) = A031971(2n) mod 2n. - Jonathan Sondow, Oct 18 2013

A302345 Primes p such that the set { 1+2p, 1+6p, 1+14p, 1+42p, 1+86p, 1+258p, 1+602p, 1+1806p } does not contain any primes.

Original entry on oeis.org

67, 97, 127, 163, 307, 317, 337, 349, 409, 521, 523, 547, 643, 709, 757, 811, 839, 857, 919, 967, 997, 1021, 1069, 1087, 1093, 1153, 1277, 1291, 1297, 1301, 1399, 1429, 1459, 1483, 1619, 1627, 1637, 1697, 1709, 1721, 1741, 1789, 1877, 1933, 1949, 1999, 2017, 2029, 2083, 2131, 2179, 2239, 2269, 2311, 2383, 2389, 2437, 2503, 2539, 2557, 2591, 2659, 2671, 2707, 2731
Offset: 1

Author

Max Alekseyev, Apr 05 2018

Keywords

Comments

For each term p, the solutions n to the congruence 1^n + 2^n + ... + n^n == p (mod n) form a subset of A014117 U p*A014117. In particular, there are at most 10 solutions for each such p.
The coefficients { 2, 6, 14, 42, 86, 258, 602, 1806 } are the even divisors of 1806 = 2 * 3 * 7 * 43.

Crossrefs

Solutions to 1^n+2^n+...+n^n == m (mod n): A005408 (m=0), A014117 (m=1), A226960 (m=2), A226961 (m=3), A226962 (m=4), A226963 (m=5), A226964 (m=6), A226965 (m=7), A226966 (m=8), A226967 (m=9), A280041 (m=19), A280043 (m=43), A302343 (m=79), A302344 (m=193).

Programs

  • Mathematica
    Select[Range[3000], PrimeQ[#] && AllTrue[{2, 6, 14, 42, 86, 258, 602, 1806}*# + 1, ! PrimeQ[#1] &] &] (* Amiram Eldar, Aug 09 2020 *)
  • PARI
    { is_A302345(p) = !vecmax( apply( x->ispseudoprime(1+x*p), 2*divisors(3*7*43) ) ); }

A330279 Numbers k such that x^k == k (mod k + 1) has multiple solutions for 0 <= x < k.

Original entry on oeis.org

27, 51, 65, 69, 75, 111, 123, 129, 147, 153, 171, 175, 185, 189, 195, 207, 231, 237, 243, 245, 267, 275, 279, 285, 291, 303, 309, 315, 321, 343, 363, 365, 369, 387, 395, 405, 411, 417, 425, 429, 435, 441, 447, 489, 495, 505, 507, 519, 531, 555, 567, 573, 591, 597
Offset: 1

Author

Christopher Cormier, Dec 09 2019

Keywords

Comments

All odd numbers have k^k == k (mod k + 1), but only some have other solutions in the least residue system (e.g. 3^27 and 19^27 == 27 (mod 28)).
Odd numbers k such that k and A000010(k+1) are not coprime. - Robert Israel, Jul 30 2023

Examples

			27 is in the list because x^27 == 27 (mod 28) has three solutions: 3, 19, and 27.
		

Crossrefs

Programs

  • Maple
    select(t -> igcd(t,numtheory:-phi(t+1))>1, [seq(i,i=1..1000,2)]); # Robert Israel, Jul 30 2023
  • Mathematica
    ok[k_] := Length[Select[Range[0, k-1], PowerMod[#, k, k + 1] == k &, 2]] > 1; Select[ Range@ 600, ok] (* Giovanni Resta, Dec 10 2019 *)
  • PARI
    isok(k) = sum(i=0, k-1, Mod(i, k+1)^k == k) > 1; \\ Michel Marcus, Dec 10 2019

A242927 Numbers m such that k^m + (k+1)^m + ... + (k+m-1)^m is prime for some k.

Original entry on oeis.org

1, 2, 6, 42, 1806
Offset: 1

Author

Derek Orr, May 26 2014

Keywords

Comments

a(5) > 500. For m values < 500 not listed above, k has been checked for k <= 5000.
For the first four terms, the least k that makes k^m + (k+1)^m + ... + (k+m-1)^m prime is {2, 1, 4, 99} respectively.
For a(5) = 1806, k = 3081 yields a strong PRP with 6663 digits. - Don Reble, Mar 23 2018
The known terms a(1..5) coincide with the finite sequence A014117. - M. F. Hasler, May 20 2019

Examples

			k^1 = k is prime for k = 2 or any other prime (cf. A000040), so 1 is a term of this sequence.
k^2 + (k+1)^2 is prime for some k (e.g., k = 2 yields 13, see A027861 for the full list), so 2 is a term of this sequence.
k^3 + (k+1)^3 + (k+2)^3 = 3*(k+1)*(k^2+2*k+3) is never prime, therefore 3 is not a term of this sequence.
Similarly, the corresponding expression for m = 4 and m = 5 is a multiple of 2 and 5, respectively, and for all m = 7, ..., 41, the expression also shares a factor with m (and thus is a multiple of m whenever m is prime).
Index m = 110 is the smallest m > 42 for which the expression is not algebraically composite (the polynomial in k has content 1 and is irreducible over Q), but it does factor as (k(k+1)(k+2)(k+3)(k+4))^10 over Z_5, so is always a multiple of 5. Index m = 210 is the next one which is a similar case.
Index m = 231 is much like m = 110, but with a factor 7 instead of 5.
Index m = 330 again yields an irreducible polynomial with content 1, but as before one can show that it is always divisible by 5. And so on.
		

Crossrefs

Programs

  • PARI
    k(n)=for(k=1,5000,if(ispseudoprime(sum(i=0,n-1,(k+i)^n)),return(k)))
    for(n=1,500,if(k(n),print(n)))  \\ Edited by M. F. Hasler, Mar 23 2018

Extensions

a(5) from Don Reble, Mar 23 2018
Example corrected and extended by M. F. Hasler, Apr 05 2018

A372771 Numbers m such that the congruence x^(m+1) == m (mod m+1) is solvable.

Original entry on oeis.org

1, 2, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 25, 26, 28, 30, 32, 33, 34, 36, 38, 40, 42, 44, 46, 48, 49, 50, 52, 54, 56, 57, 58, 60, 62, 64, 66, 68, 70, 72, 73, 74, 76, 78, 80, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 105, 106, 108, 110
Offset: 1

Author

Juri-Stepan Gerasimov, May 12 2024

Keywords

Comments

Includes all positive even numbers. - Robert Israel, Mar 14 2025

Examples

			9 is a term because x^(9+1) == 9 (mod 9+1) for x = 3 and x = 7, i.e., 3^10 = 59049 == 9 (mod 10) and 7^10 = 282475249 == 9 (mod 10).
		

Crossrefs

Programs

  • Maple
    select(m -> traperror(NumberTheory:-ModularRoot(m,m+1,m+1))::integer, [$1..200]); # Robert Israel, Mar 14 2025
  • Mathematica
    Select[Range[1, 110], With[{m = #}, AnyTrue[Range[1, m + 1], PowerMod[#, m + 1, m + 1] == m &]] &] (* Robert P. P. McKone, May 14 2024 *)

Extensions

Terms corrected by Robert P. P. McKone, May 14 2024

A108500 Number of values of k (1<=k<=n) where k^(n+1) != k mod n, or equivalently where sum_i{1<=i<=n} k^i != 0 mod n.

Original entry on oeis.org

0, 0, 1, 1, 3, 0, 5, 3, 5, 4, 9, 3, 11, 8, 11, 7, 15, 4, 17, 5, 13, 16, 21, 9, 19, 20, 17, 19, 27, 12, 29, 15, 29, 28, 31, 15, 35, 32, 31, 15, 39, 0, 41, 35, 37, 40, 45, 21, 41, 28, 47, 37, 51, 16, 43, 41, 49, 52, 57, 15, 59, 56, 47, 31, 61, 48, 65, 53, 65, 52, 69, 37, 71, 68, 63, 67
Offset: 1

Author

Henry Bottomley, Jun 06 2005

Keywords

Examples

			a(2)=0 since 1^3 = 1 mod 2 and 2^3 = 8 = 0 mod 2 = 2 mod 2.
a(3)=1 since 2^1+2^2+2^3 = 14 = 2 mod 3 != 0 mod 3 but 1^1+1^2+1^3 = 3 = 0 mod 3 and 3^1+3^2+3^3 = 39 = 0 mod 3.
		

Crossrefs

Numbers of nonzeros in rows of A108497 or A108498.

Formula

a(n)=n-A108499(n). a(n)=0 iff n is in A014117. a(p)=p-2 for p prime.

A259111 a(n) = least number k > 1 such that 1^k + 2^k + ... + k^k == n (mod k).

Original entry on oeis.org

2, 4, 2, 8, 2, 3, 2, 16, 2, 4, 2, 3, 2, 4, 2, 32, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 7, 2, 3, 2, 64, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 7, 2, 4, 2, 3, 2, 4, 2, 128, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 8, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 11, 2, 3, 2, 8, 2, 4, 2, 3, 2, 4, 2, 5
Offset: 1

Author

Derek Orr, Jun 18 2015

Keywords

Examples

			Consider n=2:
Is k=2? 1^2 + 2^2 == 1 (mod 2). No.
Is k=3? 1^3 + 2^3 + 3^3 == 0 (mod 3). No.
Is k=4? 1^4 + 2^4 + 3^4 + 4^4 == 2 (mod 4). Yes. So a(2) = 4.
(Example corrected by _N. J. A. Sloane_, Jul 02 2019)
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k; for k from 2 while
          add(i&^k mod k, i=1..k) mod k <> n mod k do od; k
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 18 2015
  • Mathematica
    lnk[n_]:=Module[{k=2},While[Mod[Total[Range[k]^k],k]!=Mod[n,k],k++];k]; Array[ lnk,100] (* Harvey P. Dale, Jul 02 2019 *)
  • PARI
    vector(100,n,k=2;while(sum(i=1,k,i^k)!=Mod(n,k),k++);k)

Formula

a(2^n) = 2^(n+1) for n >= 0.
Previous Showing 31-40 of 42 results. Next