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
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.
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
-
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);
-
Table[Mod[Total[PowerMod[Range[2*n], 2*n, 2*n]], 2*n], {n, 100}] (* T. D. Noe, Apr 28 2012 *)
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
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).
-
Select[Range[3000], PrimeQ[#] && AllTrue[{2, 6, 14, 42, 86, 258, 602, 1806}*# + 1, ! PrimeQ[#1] &] &] (* Amiram Eldar, Aug 09 2020 *)
-
{ 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
27 is in the list because x^27 == 27 (mod 28) has three solutions: 3, 19, and 27.
-
select(t -> igcd(t,numtheory:-phi(t+1))>1, [seq(i,i=1..1000,2)]); # Robert Israel, Jul 30 2023
-
ok[k_] := Length[Select[Range[0, k-1], PowerMod[#, k, k + 1] == k &, 2]] > 1; Select[ Range@ 600, ok] (* Giovanni Resta, Dec 10 2019 *)
-
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
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.
-
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
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
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).
-
select(m -> traperror(NumberTheory:-ModularRoot(m,m+1,m+1))::integer, [$1..200]); # Robert Israel, Mar 14 2025
-
Select[Range[1, 110], With[{m = #}, AnyTrue[Range[1, m + 1], PowerMod[#, m + 1, m + 1] == m &]] &] (* 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
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.
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
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)
-
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
-
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 *)
-
vector(100,n,k=2;while(sum(i=1,k,i^k)!=Mod(n,k),k++);k)
Comments