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.

Showing 1-7 of 7 results.

A328444 Lexicographically earliest sequence of distinct positive numbers such that a(1) = 1, a(2) = 2, and for n > 2, a(n) divides Sum_{i = n-k..n-1} a(i) with k > 0 as small as possible.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 13, 11, 6, 17, 23, 8, 31, 39, 7, 46, 53, 33, 43, 19, 62, 27, 89, 29, 59, 22, 81, 103, 92, 15, 107, 61, 12, 73, 85, 79, 41, 10, 51, 34, 95, 129, 14, 143, 157, 20, 177, 197, 187, 16, 203, 219, 211, 86, 99, 37, 68, 21, 18, 24, 42, 66, 36, 102
Offset: 1

Views

Author

Rémy Sigrist, Oct 15 2019

Keywords

Comments

When computing a(n) for n > 2, there may be candidates for different values of k; we choose the candidate that minimizes k.
This sequence is an infinite variant of A085947; a(n) = A085947(n) for n = 1..39.

Examples

			For n = 3:
- the divisors of a(2) = 2 are all already in the sequence,
- 3 is the least divisor of a(1) + a(2) = 1 + 2 = 3 not yet in the sequence,
- so a(3) = 3.
For n = 4:
- the divisors of a(3) = 3 are all already in the sequence,
- 5 is the least divisor of a(2) + a(3) = 2 + 3 = 5 not yet in the sequence,
- so a(3) = 5.
For n = 5:
- the divisors of a(4) = 5 are all already in the sequence,
- 4 is the least divisor of a(3) + a(4) = 3 + 5 = 8 not yet in the sequence,
- so a(5) = 4.
		

Crossrefs

See A328443 for a similar sequence.
Cf. A085947.

Programs

  • PARI
    \\ See Links section.

Formula

a(n) <= Sum_{k = 1..n-1} a(k) for any n > 2.

A332301 a(1) = 1, a(2) = 2; for n > 2, a(n) is the smallest divisor of the sum of the previous two terms that has not yet appeared. If all divisors have appeared then a(n) equals the sum.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 13, 11, 6, 17, 23, 8, 31, 39, 7, 46, 53, 33, 43, 19, 62, 27, 89, 29, 59, 22, 81, 103, 92, 15, 107, 61, 12, 73, 85, 79, 41, 10, 51, 61, 14, 25, 39, 16, 55, 71, 18, 89, 107, 28, 45, 73, 118, 191, 309, 20, 47, 67, 38, 21, 59, 40, 99, 139, 34, 173, 69, 121, 95, 24, 119, 143, 131, 137, 134, 271, 135, 58, 193
Offset: 1

Views

Author

Scott R. Shannon, Feb 09 2020

Keywords

Comments

This sequence uses the same rules as A085947 except that the restriction of all entries being unique is removed. The first term to repeat is 61 which appears at a(32) and then again at a(40). But in this case as a(31) and a(39) are different the sequence does not form a repeating loop of values. In fact it is easy to show the sequence can never form a repeating loop. If it did it would imply there is a first value A such that the sequence would be of the form ...,A,B,C,D,...,X,Y,A,B,C,D,...,X,Y,A,B,C,... . As the terms in the repeating loop are unchanging it implies every term's divisors have been previously seen, and thus A+B=C and B+C=D and so on, and thus each term in the loop is larger than the previous term. But that leads to a contradiction as from the first loop X and Y are larger than A, but the beginning of the second loop implies X+Y=A. Thus no unchanging series of repeated terms can exist.
In the first 1 million terms the largest value is a(895234) = 25216687, the lowest unseen value is 69006, and the value seen the most frequently is 618083, which occurs six times.

Examples

			a(5) = 4 as a(3) + a(4) = 3 + 5 = 8, and the divisors of 8 are 1,2,4,8. 1 and 2 have already appeared so 4 is the least divisor not yet in the sequence.
a(40) = 61 as a(38) + a(39) = 10 + 51 = 61. The divisors of 61 are 1 and 61, both of which have already appeared, at a(1) and a(32), thus a(40) = 61. Note that as a(31) and a(39) differ a(33) and a(41) differ and the sequence does not repeat.
		

Crossrefs

A140460 a(0) = 2; thereafter a(n) = smallest integer not a multiple of an earlier terms nor a sum of two earlier terms.

Original entry on oeis.org

2, 3, 7, 11, 17, 23, 29, 37, 41, 47, 53, 59, 65, 71, 79, 83, 89, 95, 101, 107, 113, 125, 131, 137, 149, 155, 163, 167, 173, 179, 191, 197, 211, 215, 223, 227, 233, 239, 247, 251, 257, 263, 269, 277, 281, 293, 305, 311, 317, 331, 335
Offset: 0

Views

Author

Russell Y. Webb (r.webb(AT)elec.canterbury.ac.nz), Jul 22 2008

Keywords

Comments

Note that the first composite value is a(12) = 65 = 5 * 13, since 5 and 13 are the first two primes sieved out of the sequence. Similarly, the second composite value is a(17) = 95 = 5 * 19, since 5 and 19 are the first and third primes sieved out of the sequence. - Jonathan Vos Post, Jul 27 2008

Crossrefs

Programs

  • C
    #include 
    #include 
    void sieve(){ const int first = 2; const int max = 10000; bool member[max]; for(int i = first; i < max; ++i){ member[i] = true; } for(int i = first; i < max; ++i){ if(member[i]){ for(int x = i + i; x < max; x += i){ member[x] = false; } for(int j = first; j < i; ++j){ if(member[j] && i + j < max){ member[i + j] = false; } } } } int num = 0; for(int i = first; i < max; ++i){ if(member[i]){ printf("%i, ", i); num += 1; } } printf(" num = %i ", num); }
  • Mathematica
    s={2};Do[m=2;Until[Total[Boole[Divisible[m,s]]]==0&&!MemberQ[Total/@Subsets[s,{2}],m],m++];AppendTo[s,m],{n,50}];s (* James C. McMahon, Jul 09 2025 *)

A323890 a(1) = 1, a(2) = 2; thereafter a(n+1) = smallest unused divisor of a(n) if there are any, otherwise a(n) + a(n-1).

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 12, 6, 18, 9, 27, 36, 63, 7, 70, 10, 80, 16, 96, 24, 120, 15, 135, 45, 180, 20, 200, 25, 225, 75, 300, 30, 330, 11, 341, 31, 372, 62, 434, 14, 448, 28, 476, 17, 493, 29, 522, 58, 580, 116, 696, 87, 783, 261, 1044, 174, 1218, 21, 1239, 59, 1298, 22, 1320, 33, 1353
Offset: 1

Views

Author

Ivan Neretin, Sep 02 2019

Keywords

Examples

			a(6) = 4, and all divisors of 4 are already used, hence a(7) = a(6) + a(5) = 8 + 4 = 12. Now the smallest unused divisor of 12 is 6, hence a(8) = 6.
		

Crossrefs

Programs

  • Mathematica
    Nest[Append[#, If[(d = Complement[Divisors@#[[-1]], #]) == {}, #[[-1]] + #[[-2]], Min[d]]] &, {1, 2}, 63]

A326791 For n > 1, let f_n be the lexicographically earliest sequence of distinct positive terms such that f_n(1) = 1, f_n(2) = n, and for k > 2, f_n(k) divides f_n(k-2) + f_n(k-1); if f_n is finite, then a(n) is the number of terms of f_n, otherwise a(n) = -1; a(1) = 1.

Original entry on oeis.org

1, 39, 23, 5, 10, 9, 31, 8, 8, 8, 7, 8, 7, 9, 10, 29, 9, 38, 36, 13, 14, 13, 8, 12, 40, 19, 11, 25, 10, 15, 13, 18, 11, 5, 39, 36, 40, 37, 12, 25, 11, 12, 29, 30, 33, 25, 32, 5, 40, 25, 12, 25, 11, 21, 40, 27, 18, 19, 17, 9, 41, 18, 11, 5, 41, 37, 40, 12, 29
Offset: 1

Views

Author

Rémy Sigrist, Oct 19 2019

Keywords

Comments

Apparently, f_n is finite for any n > 0.
The first records are:
n a(n)
------- ----
1 1
2 39
25 40
61 41
78 45
266 47
279 56
629 102
95417 103
331468 104
1318090 108
5383290 109

Examples

			For n = 2:
- f_2 corresponds to A085947 which is finite with 39 terms,
- hence a(2) = 39.
		

Crossrefs

Cf. A085947.

Programs

  • PARI
    See Links section.

A329811 Lexicographically earliest sequence of distinct positive integers such that for any consecutive triple of digits, say (x, y, z), x+y is a multiple of z.

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 11, 12, 13, 14, 15, 6, 17, 8, 19, 21, 31, 23, 51, 32, 57, 18, 91, 52, 7, 35, 16, 71, 41, 53, 25, 72, 111, 112, 131, 45, 34, 151, 61, 74, 152, 73, 54, 37, 29, 121, 123, 58, 132, 134, 153, 47, 141, 56, 171, 81, 92, 1111, 211, 213, 145, 38, 191
Offset: 1

Views

Author

Eric Angelini and Rémy Sigrist, Nov 21 2019

Keywords

Comments

This sequence is infinite as we can always extend it with a repunit not yet used.
All terms are zeroless.
113 is the first zeroless number that cannot appear in this sequence.

Examples

			The first terms, alongside the corresponding (x, y, z), are:
  n   a(n)  x  y  z
  --  ----  -  -  -
   1     1  1  2  3
   2     2  2  3  5
   3     3  3  5  4
   4     5  5  4  9
   5     4  4  9  1
   6     9  9  1  1
   7    11  1  1  1
            1  1  2
   8    12  1  2  1
            2  1  3
   9    13  1  3  1
            3  1  4
  10    14  1  4  1
            4  1  5
  11    15  1  5  6
            5  6  1
		

Crossrefs

Programs

  • PARI
    See Links section.
    (C#) See Links section.

A360281 Lexicographically earliest sequence of distinct positive integers such that for any n > 2, a(n) is a divisor or a multiple of a(n-1) + a(n-2).

Original entry on oeis.org

1, 2, 3, 5, 4, 9, 13, 11, 6, 17, 23, 8, 31, 39, 7, 46, 53, 33, 43, 19, 62, 27, 89, 29, 59, 22, 81, 103, 92, 15, 107, 61, 12, 73, 85, 79, 41, 10, 51, 122, 173, 295, 18, 313, 331, 14, 69, 83, 38, 121, 159, 20, 179, 199, 21, 44, 65, 109, 58, 167, 25, 16, 82, 49
Offset: 1

Views

Author

Rémy Sigrist, Feb 01 2023

Keywords

Comments

This sequence has similarities with A085947, A328444 and A332301:
- these sequences agree for n = 1..39,
- however, a(40) = 122,
A085947(40) does not exist,
A328444(40) = 34,
A332301(40) = 61.

Examples

			The first terms, alongside the relationship with the two prior terms, are:
  n   a(n)  Relationship
  --  ----  ------------
   1     1  N/A
   2     2  N/A
   3     3  2+1
   4     5  3+2
   5     4  (5+3)/2
   6     9  4+5
   7    13  9+4
   8    11  (13+9)/2
   9     6  (11+13)/4
  10    17  6+11
  11    23  17+6
  12     8  (23+17)/5
		

Crossrefs

Programs

  • PARI
    \\ See Links section.
Showing 1-7 of 7 results.