[go: up one dir, main page]

login
Search: a341760 -id:a341760
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(n) is the smallest positive integer k > 1 such that n + k divides n^n + k, or 0 if no such k exists.
+10
5
2, 0, 3, 2, 3, 4, 2, 6, 3, 5, 4, 10, 2, 12, 5, 2, 3, 16, 2, 18, 3, 4, 10, 22, 3, 24, 9, 8, 6, 28, 2, 30, 7, 17, 5, 6, 2, 36, 9, 5, 3, 40, 6, 42, 3, 4, 22, 46, 2, 20, 4, 16, 7, 52, 2, 14, 3, 5, 28, 58, 2, 60, 9, 8, 3, 9, 2, 66, 11, 20, 4, 70, 3, 72, 20, 14, 3, 8, 5, 78, 4, 32, 40, 82, 2, 24, 29, 11, 3, 88, 2, 6, 7, 23
OFFSET
1,1
COMMENTS
k > 1 is needed in the definition as n+1 divides n^n+1 for all odd n. - Chai Wah Wu, Jun 04 2021
LINKS
MATHEMATICA
a[n_] := Module[{k = 2}, While[! Divisible[n^n + k, n + k], k++]; k]; Array[a, 100, 3] (* Amiram Eldar, Jun 04 2021 *)
PROG
(PARI) a(n) = if(n==2, 0, my(k=2); while((n^n+k)%(n+k)!=0, k++); k);
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 04 2021
STATUS
approved
Least k > 1 such that (n+k^n)/(n+k) is an integer.
+10
4
2, 4, 3, 6, 3, 5, 2, 4, 3, 3, 4, 14, 2, 7, 5, 18, 3, 20, 2, 8, 3, 7, 10, 6, 3, 13, 9, 9, 6, 29, 2, 12, 7, 12, 5, 38, 2, 19, 9, 13, 3, 41, 6, 11, 3, 15, 22, 8, 2, 25, 4, 39, 7, 12, 2, 13, 3, 60, 28, 62, 2, 31, 9, 10, 3, 5, 2, 24, 11, 24, 4, 74, 3, 37, 20, 25, 3, 80, 5, 10, 4, 9, 40, 18, 2, 37, 29, 16, 3, 15, 2
OFFSET
1,1
LINKS
MATHEMATICA
a[n_] := Module[{k = 2}, While[! Divisible[k^n + n, n + k], k++]; k]; Array[a, 100] (* Amiram Eldar, Jun 04 2021 *)
PROG
(PARI) a(n) = my(k=2); while((n+k^n)%(n+k)!=0, k++); k;
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Jun 04 2021
STATUS
approved
Least k > 1 such that (n^n+k^k)/(n+k) is an integer.
+10
4
3, 2, 3, 4, 2, 3, 3, 2, 3, 5, 9, 4, 11, 14, 3, 16, 6, 3, 5, 5, 3, 10, 5, 3, 5, 6, 3, 4, 4, 4, 7, 18, 3, 17, 5, 9, 7, 26, 3, 10, 7, 6, 7, 20, 5, 7, 23, 6, 7, 8, 3, 12, 13, 10, 5, 8, 13, 3, 11, 3, 16, 6, 3, 29, 5, 6, 21, 6, 3, 5, 9, 6, 5, 17, 3, 19, 7, 12, 7, 20, 3, 5, 19, 12, 15, 42, 3, 13, 4, 6, 7, 14, 15, 34, 5, 12, 15, 14, 3
OFFSET
1,1
LINKS
FORMULA
a(n) <= n for all n > 1.
MATHEMATICA
a[n_] := Module[{k = 2}, While[! Divisible[n^n + k^k, n + k], k++]; k]; Array[a, 100] (* Amiram Eldar, Jun 04 2021 *)
PROG
(PARI) a(n) = my(k=2); while((n^n+k^k)%(n+k)!=0, k++); k;
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Seiichi Manyama, Jun 04 2021
STATUS
approved

Search completed in 0.005 seconds