[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a126428 -id:a126428
     Sort: relevance | references | number | modified | created      Format: long | short | data
"Magic" integers: a(n+1) is the smallest integer m such that there is no overlap between the sets {m, m-a(i), m+a(i): 1 <= i <= n} and {a(i), a(i)-a(j), a(i)+a(j): 1 <= j < i <= n}.
(Formerly M2728)
+0
5
1, 3, 8, 18, 30, 43, 67, 90, 122, 161, 202, 260, 305, 388, 416, 450, 555, 624, 730, 750, 983, 1059, 1159, 1330, 1528, 1645, 1774, 1921, 2140, 2289, 2580, 2632, 2881, 3158, 3304, 3510, 3745, 4086, 4563, 4741, 4928, 5052, 5407, 5864, 6242, 6528, 6739, 7253
OFFSET
1,2
COMMENTS
The definition implies that the sets {a(i)} (A004210), {a(i)-a(j), j < i} (A206522) and {a(i)+a(j), j < i} (A206523) are disjoint. A206524 gives the complement of their union.
REFERENCES
R. A. Bates, E. Riccomagno, R. Schwabe, H. P. Wynn, Lattices and dual lattices in optimal experimental design for Fourier models, Computational Statistics & Data Analysis Volume 28, Issue 3, 4 September 1998, Pages 283-296. See page 293.
D. R. Hofstadter, "Goedel, Escher, Bach: An Eternal Golden Braid", Basic Books Incorporated, p. 73
P. Mark Kayll, Well-spread sequences and edge-labelings with constant Hamiltonian weight, Disc. Math. & Theor. Comp. Sci 6 2 (2004) 401-408
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
B. G. DeBoer, Letter to N. J. A. Sloane, Dec 15 1978, with enclosure of Silvertom article.
J. V. Silverton, On the generation of 'magic integrals', Acta Cryst. A34 (1978) p. 634.
Eric Weisstein's World of Mathematics, Magic Integer.
FORMULA
a(n+1) = min{ k | k and k +- a(i) are not equal to a(i) or a(i)-a(j) or a(i)+a(j) for any n+1 > i > j > 0}. [Corrected by T. D. Noe, Sep 08 2008]
MATHEMATICA
a[1] = 1; a[n_] := a[n] = Module[{pairs = Flatten[ Table[{a[j] + a[k], a[k] - a[j]}, {j, 1, n-1}, {k, j+1, n-1}]], an = a[n-1] + 1}, While[ True, If[ Intersection[ Join[ Array[a, n-1], pairs], Prepend[ Flatten[ Table[{a[j] + an, an - a[j]}, {j, 1, n-1}]], an]] == {}, Break[], an++]]; an]; Table[a[n], {n, 1, 48}] (* Jean-François Alcover, Nov 10 2011 *)
PROG
(Haskell)
import Data.List (intersect)
a004210 n = a004210_list !! (n-1)
a004210_list = magics 1 [0] [0] where
magics :: Integer -> [Integer] -> [Integer] -> [Integer]
magics n ms tests
| tests `intersect` nMinus == [] && tests `intersect` nPlus == []
= n : magics (n+1) (n:ms) (nMinus ++ nPlus ++ tests)
| otherwise
= magics (n+1) ms tests
where nMinus = map (n -) ms
nPlus = map (n +) ms
-- magics works also as generator for a126428_list, cf. A126428.
-- Reinhard Zumkeller, Mar 03 2011
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
N. J. A. Sloane, following a suggestion from B. G. DeBoer, Dec 15 1978
EXTENSIONS
Additional comments from Robert M. Burton, Jr. (bob(AT)oregonstate.edu), Feb 20 2005
More terms from Joshua Zucker, May 04 2006
Edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
Edited by N. J. A. Sloane, Feb 08 2012
STATUS
approved
Primes of the form n^7-n-1.
+0
3
2097143, 1801088519, 21869999969, 42618442943, 78364164059, 137231006639, 194754273839, 435817657169, 678223072799, 1174711139783, 1727094849479, 3938980639103, 4398046511039, 4902227890559, 6722988818363, 19203908986079
OFFSET
1,1
COMMENTS
All terms end in 3 or 9. - Robert Israel, Jul 22 2019
LINKS
MAPLE
map(t -> t^7-t-1, select(t -> isprime(t^7-t-1), [$1..10^4])); # Robert Israel, Jul 22 2019
MATHEMATICA
k = 7; a = {}; Do[If[PrimeQ[x^k - x - 1], AppendTo[a, x^k - x - 1]], {x, 1, 100}]; a
Select[Table[n^7-n-1, {n, 80}], PrimeQ] (* Harvey P. Dale, Jun 20 2020 *)
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 26 2006
STATUS
approved
Primes of the form k^8-k-1.
+0
3
1679609, 5764793, 99999989, 4294967279, 282429536453, 377801998307, 5352009260441, 16815125390579, 39062499999949, 72301961339081, 83733937890569, 281474976710591, 513798374428571, 1113034787454899
OFFSET
1,1
LINKS
MATHEMATICA
k = 8; a = {}; Do[If[PrimeQ[x^k - x - 1], AppendTo[a, x^k - x - 1]], {x, 1, 100}]; a
Select[Table[k^8-k-1, {k, 80}], PrimeQ] (* Harvey P. Dale, Nov 06 2021 *)
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 26 2006
STATUS
approved
Primes of the form n^9-n-1.
+0
2
509, 262139, 10077689, 387420479, 68719476719, 118587876479, 1207269217769, 7625597484959, 10578455953379, 129961739795039, 327381934393919, 1628413597910399, 1953124999999949, 5416169448144839, 10077695999999939
OFFSET
1,1
LINKS
MATHEMATICA
k = 9; a = {}; Do[If[PrimeQ[x^k - x - 1], AppendTo[a, x^k - x - 1]], {x, 1, 100}]; a
Select[Table[n^9-n-1, {n, 100}], PrimeQ] (* Harvey P. Dale, Mar 09 2016 *)
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 26 2006
STATUS
approved
Least prime of the form x^n-x-1.
+0
1
5, 5, 13, 29, 61, 2097143, 1679609, 509, 1021, 8589934583, 4093, 67108859, 16381, 470184984569, 4294967291, 2218611106740436979, 68719476731, 1350851717672992079, 1048573, 10460353199, 4194301, 20013311644049280264138724244295359, 16777213, 108347059433883722041830239, 20282409603651670423947251285999, 58149737003040059690390159, 72057594037927931, 536870909, 999999999999999999999999999989
OFFSET
2,1
MATHEMATICA
a = {}; Do[k = 2; While[ ! PrimeQ[k^n -k - 1], k++ ]; AppendTo[a, k^n - k - 1], {n, 2, 30}]; a (*Artur Jasinski*)
KEYWORD
nonn
AUTHOR
Artur Jasinski, Dec 26 2006, Jan 19 2007
STATUS
approved

Search completed in 0.005 seconds