login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095258 a(n+1) is the smallest divisor of (2 + sum of first n terms) but not occurring earlier; a(1) = 1. 13
1, 3, 2, 4, 6, 9, 27, 18, 8, 5, 17, 34, 68, 12, 24, 10, 25, 11, 13, 23, 7, 47, 94, 235, 15, 16, 32, 48, 51, 289, 578, 102, 36, 26, 73, 219, 30, 20, 14, 46, 50, 470, 60, 40, 146, 21, 49, 28, 113, 29, 19, 35, 42, 54, 64, 22, 77, 329, 84, 56, 292, 365, 65, 37, 131, 38, 33 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Conjecture: integer permutation with inverse A095259: a(A095259(n))=A095259(a(n))=n. - Comment revised: Reinhard Zumkeller, Dec 31 2014
A095260(n) = a(a(n)).
First fixed points: 1, 4, 54, 416, ...
A253415(n) = smallest missing number within the first n terms. - Reinhard Zumkeller, Dec 31 2014
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000 (first 797 terms from Reinhard Zumkeller)
Michael De Vlieger, Log-log scatterplot of a(n) for n = 1..2^16.
Michael De Vlieger, Annotated log-log scatterplot of a(n) for n = 1..2^14 showing records in red, local minima in blue, primes in magenta, prime powers not prime in gold.
MATHEMATICA
c[_] = 0; j = c[1] = 1; s = 3; {j}~Join~Reap[Do[d = Divisors[s]; k = 1; While[c[d[[k]]] > 0, k++]; Set[k, d[[k]]]; Set[c[k], i]; Sow[k]; j = k; s += k, {i, 2, 80}]][[-1, -1]] (* Michael De Vlieger, Jan 23 2022 *)
PROG
(Haskell)
import Data.List (delete)
a095258 n = a095258_list !! (n-1)
a095258_list = 1 : f [2..] 1 where
f xs z = g xs where
g (y:ys) = if mod z' y > 0 then g ys else y : f (delete y xs) (z + y)
z' = z + 2
-- Reinhard Zumkeller, Dec 31 2014
(Python)
from itertools import islice
from sympy import divisors
def A095258_gen(): # generator of terms
bset, s = {1}, 3
yield 1
while True:
for d in divisors(s):
if d not in bset:
yield d
bset.add(d)
s += d
break
A095258_list = list(islice(A095258_gen(), 30)) # Chai Wah Wu, Jan 25 2022
CROSSREFS
Cf. A253415.
Sequence in context: A116425 A019653 A240493 * A114745 A352915 A361401
KEYWORD
nonn,look
AUTHOR
Reinhard Zumkeller, May 31 2004
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 18:36 EDT 2024. Contains 375954 sequences. (Running on oeis4.)