cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A109890 a(1)=1; for n>1, a(n) is the smallest number not already present which is a divisor or a multiple of a(1)+...+a(n-1).

This page as a plain text file.
%I A109890 #41 Apr 20 2024 11:00:46
%S A109890 1,2,3,6,4,8,12,9,5,10,15,25,20,24,16,32,48,30,18,36,27,13,7,53,106,
%T A109890 265,159,318,212,14,107,321,214,428,642,535,35,21,181,11,33,22,23,59,
%U A109890 70,28,151,29,19,233,466,2563,699,932,40,26,38,31,61,39,49,98,42
%N A109890 a(1)=1; for n>1, a(n) is the smallest number not already present which is a divisor or a multiple of a(1)+...+a(n-1).
%C A109890 Conjectured to be a rearrangement of the natural numbers.
%C A109890 For n>2, a(n) <= a(1)+...+a(n-1). Proof: a(1)+...+a(n-1) >= max { a(i), i=1..n-1}, so a(1)+...+a(n-1) is always a candidate for a(n). QED. So the definition may be changed to: a(1)=1, a(2)=2; for n>2, a(n) is the smallest number not already present which is a divisor of a(1)+...+a(n-1). - _N. J. A. Sloane_, Nov 05 2005
%C A109890 Except for first two terms, same as A094339. - _David Wasserman_, Jan 06 2009
%C A109890 A253443(n) = smallest missing number within the first n terms. - _Reinhard Zumkeller_, Jan 01 2015
%H A109890 Richard J. Mathar and Reinhard Zumkeller, <a href="/A109890/b109890.txt">Table of n, a(n) for n = 1..10000</a> (first 789 terms from Richard J. Mathar)
%H A109890 Michael De Vlieger, <a href="/A109890/a109890.txt">Mathematica algorithm for this sequence and A109735 that avoids searching lists to speed output</a>
%H A109890 Michael De Vlieger, <a href="/A109890/a109890.png">Log log scatterplot of a(n)</a>, n = 1..2^16, showing primes in red, perfect powers of primes in gold, squarefree composites in green, and other numbers in blue.
%e A109890 Let s(n) = A109735(n) = sum(a(1..n)):
%e A109890 .                   | divisors of s(n),
%e A109890 .                   | in brackets when occurring in a(1..n)
%e A109890 .   n | a(n) | s(n) | A027750(s(n),1..A000005(s(n)))
%e A109890 .  ---+------+------+---------------------------------------------------
%e A109890 .   1 |    1 |    1 | (1)
%e A109890 .   2 |    2 |    3 | (1)  3
%e A109890 .   3 |    3 |    6 | (1 2 3)  6
%e A109890 .   4 |    6 |   12 | (1 2 3)  4  (6)  12
%e A109890 .   5 |    4 |   16 | (1 2 4)  8 16
%e A109890 .   6 |    8 |   24 | (1 2 3 4 6 8)  12 24
%e A109890 .   7 |   12 |   36 | (1 2 3 4 6)  9  (12)  18 36
%e A109890 .   8 |    9 |   45 | (1 3)  5  (9)  15 45
%e A109890 .   9 |    5 |   50 | (1 2 5)  10 25 50
%e A109890 .  10 |   10 |   60 | (1 2 3 4 5 6 10 12)  15 20 30 60
%e A109890 .  11 |   15 |   75 | (1 3 5 15)  25 75
%e A109890 .  12 |   25 |  100 | (1 2 4 5 10)  20  (25)  50 100
%e A109890 .  13 |   20 |  120 | (1 2 3 4 5 6 8 10 12 15 20)  24 30 40 60 120
%e A109890 .  14 |   24 |  144 | (1 2 3 4 6 8 9 12)  16 18  (24)  36 48 72 144
%e A109890 .  15 |   16 |  160 | (1 2 4 5 8 10 16 20)  32 40 80 160
%e A109890 .  16 |   32 |  192 | (1 2 3 4 6 8 12 16 24 32)  48 64 96 192
%e A109890 .  17 |   48 |  240 | (.. 8 10 12 15 16 20 24)  30 40  (48)  60 80 120 240
%e A109890 .  18 |   30 |  270 | (1 2 3 5 6 9 10 15)  18 27  (30)  45 54 90 135 270
%e A109890 .  19 |   18 |  288 | (.. 6 8 9 12 16 18 24 32)  36  (48)  72 96 144 288
%e A109890 .  20 |   36 |  324 | (1 2 3 4 6 9 12 18)  27  (36)  54 81 108 162 324
%e A109890 .  21 |   27 |  351 | (1 3 9)  13  (27)  39 117 351
%e A109890 .  22 |   13 |  364 | (1 2 4)  7  (13)  14 26 28 52 91 182 364
%e A109890 .  23 |    7 |  371 | (1 7)  53 371
%e A109890 .  24 |   53 |  424 | (1 2 4 8 53)  106 212 424
%e A109890 .  25 |  106 |  530 | (1 2 5 10 53 106)  265 530  .
%e A109890 - _Reinhard Zumkeller_, Jan 05 2015
%p A109890 M:=2000; a:=array(1..M): a[1]:=1: a[2]:=2: as:=convert(a,set): b:=3: for n from 3 to M do t2:=divisors(b) minus as; t4:=sort(convert(t2,list))[1]; a[n]:=t4; b:=b+t4; as:={op(as),t4}; od: aa:=[seq(a[n],n=1..M)]:
%t A109890 a[1] = 1; a[2] = 2; a[n_] := a[n] = Block[{t = Table[a[i], {i, n - 1}]}, s = Plus @@ t; d = Divisors[s]; l = Complement[d, t]; If[l != {}, k = First[l], k = s; While[Position[t, k] == {}, k += s]; k]]; Table[ a[n], {n, 40}] (* _Robert G. Wilson v_, Aug 12 2005 *)
%o A109890 (Haskell)
%o A109890 import Data.List (insert)
%o A109890 a109890 n = a109890_list !! (n-1)
%o A109890 a109890_list = 1 : 2 : 3 : f (4, []) 6 where
%o A109890    f (m,ys) z = g $ dropWhile (< m) $ a027750_row' z where
%o A109890      g (d:ds) | elem d ys = g ds
%o A109890               | otherwise = d : f (ins [m, m + 1 ..] (insert d ys)) (z + d)
%o A109890      ins (u:us) vs'@(v:vs) = if u < v then (u, vs') else ins us vs
%o A109890 -- _Reinhard Zumkeller_, Jan 02 2015
%o A109890 (Python)
%o A109890 from sympy import divisors
%o A109890 A109890_list, s, y, b = [1, 2], 3, 3, set()
%o A109890 for _ in range(1,10**3):
%o A109890     for i in divisors(s):
%o A109890         if i >= y and i not in b:
%o A109890             A109890_list.append(i)
%o A109890             s += i
%o A109890             b.add(i)
%o A109890             while y in b:
%o A109890                 b.remove(y)
%o A109890                 y += 1
%o A109890             break # _Chai Wah Wu_, Jan 05 2015
%Y A109890 Cf. A109735, A109736, A111238, A111239, A111240, A111241, A064413 (EKG sequence), A094339, A111315, A111316.
%Y A109890 Cf. A027750, A253443, A253444, A095258.
%K A109890 easy,nonn,look
%O A109890 1,2
%A A109890 _Amarnath Murthy_, Jul 13 2005
%E A109890 More terms from _Erich Friedman_, Aug 08 2005