login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A235538 Earliest infinite sequence of natural numbers such that the members of this sequence as well as the absolute values of the members of the k-th differences of this sequence, for all k>0, are all distinct. 3
1, 3, 9, 26, 5, 13, 31, 15, 27, 81, 22, 45, 92, 20, 50, 145, 46, 89, 32, 71, 151, 40, 75, 163, 73, 124, 60, 126, 244, 97, 219, 63, 132, 306, 68, 144, 297, 79, 166, 354, 83, 187, 394, 94, 203, 419, 108, 220, 460, 127, 260, 110, 247, 513, 161, 340, 117, 252 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Paul Tek, Table of n, a(n) for n = 1..1000

Paul Tek, PERL program for this sequence

EXAMPLE

For n=1:

- 1 is admissible; hence a(1)=1.

For n=2:

- 1 is not admissible (as it already appears in the sequence),

- 2 is not admissible (as a(1) would appear in the first differences),

- 3 is admissible; hence a(2)=3.

For n=3:

- 1 is not admissible (as it already appears in the sequence),

- 2 is not admissible (as it already appears in the first differences),

- 3 is not admissible (as it already appears in the sequence),

- 4 is not admissible (as a(1) would appear in the first differences),

- 5 is not admissible (as 2 would appear twice in the first differences),

- 6 is not admissible (as a(2) would appear in the first differences),

- 7 is not admissible (as 2 would appear in the first and second differences),

- 8 is not admissible (as a(2) would appear in the second differences),

- 9 is admissible; hence a(3)=9.

MATHEMATICA

a[1] = 1; diffs0 = {1} (* flattened array of successive differences *);

a[n_] := a[n] = Module[{}, aa = Array[a, n-1]; m0 = 1; While[ MemberQ[ diffs0, m0], m0++]; For[m = m0, True, m++, am = Append[aa, m]; td = Table[Differences[am, k], {k, 0, n-1}]; diffs = Abs[Flatten[td]]; If[ Length[diffs] == Length[Union[diffs]], diffs0 = diffs//Sort; Return[m]]] ];

Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 100}] (* Jean-François Alcover, Jan 31 2018 *)

PROG

(Perl) See Link section.

CROSSREFS

Cf. A005228, A005282, A035312, A235539, A327460, A327887.

Sequence in context: A013572 A119851 A119825 * A218916 A037260 A035313

Adjacent sequences:  A235535 A235536 A235537 * A235539 A235540 A235541

KEYWORD

nonn,nice

AUTHOR

Paul Tek, Jan 12 2014

EXTENSIONS

Added "infinite" to definition. - N. J. A. Sloane, Oct 05 2019

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 4 08:57 EST 2021. Contains 349484 sequences. (Running on oeis4.)