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.

Previous Showing 11-20 of 23 results. Next

A137902 Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add to the term at position n + a(n) the value 1 if the term is odd, otherwise divide the term by 2.

Original entry on oeis.org

1, 1, 4, 4, 5, 6, 8, 4, 9, 5, 11, 3, 13, 14, 4, 16, 17, 9, 20, 20, 21, 11, 23, 24, 25, 13, 28, 14, 29, 30, 31, 16, 34, 17, 35, 36, 37, 38, 20, 20, 41, 22, 43, 44, 45, 23, 47, 12, 49, 25, 52, 52, 53, 54, 56, 56, 57, 29, 60, 16, 61, 31, 63, 32, 65, 66, 68, 68, 70, 35
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 30 2008

Keywords

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = [1..nn]); for (n=1, nn, my(m = n+va[n]); if (m <= nn, if (va[m] % 2, va[m]++, va[m] /= 2));); va; \\ Michel Marcus, Oct 29 2022

Extensions

More terms from Michel Marcus, Oct 29 2022

A242535 Start with the natural numbers and repeatedly take and keep the current initial term i, and remove m and 2m, where m = i-th term of the rest; repeat.

Original entry on oeis.org

1, 3, 5, 6, 8, 9, 10, 12, 13, 16, 17, 18, 20, 21, 24, 25, 27, 28, 29, 32, 33, 35, 36, 37, 39, 41, 42, 44, 45, 48, 49, 50, 53, 54, 56, 57, 58, 59, 61, 63, 65, 66, 67, 70, 71, 73, 74, 76, 77, 78, 79, 82, 83, 85, 87, 88, 90, 91, 93, 95, 97, 98, 99, 101, 103
Offset: 1

Views

Author

Reinhard Zumkeller, May 17 2014

Keywords

Examples

			Start with 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,...
step 1: take 1, remove (1st term from the rest) = 2 and 2*2 = 4,
leaving 3,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26...
step 2: take 3, remove (3rd term from the rest) = 7 and 2*7 = 14,
leaving 5,6,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,28,...
step 3: take 5, remove (5th term from the rest) = 11 and 2*11 = 22,
leaving 6,8,9,10,12,13,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,...
step 4: take 6, remove (6th term from the rest) = 15 and 2*15 = 30,
leaving 8,9,10,12,13,16,17,18,19,20,21,23,24,25,26,27,28,29,31,32,33,...
step 5: take 8, remove (8th term from the rest) = 19 and 2*19 = 38,
leaving 9,10,12,13,16,17,18,20,21,23,24,25,26,27,28,29,31,32,33,34,35,...
step 6: take 9, remove (9th term from the rest) = 23, and 2*23 = 46,
leaving 10,12,13,16,17,18,20,21,24,25,26,27,28,29,31,32,33,34,35,36,...
		

Crossrefs

Cf. A136119.

Programs

  • Haskell
    import Data.List ((\\))
    a242535 n = a242535_list !! (n-1)
    a242535_list = f [1..] where
       f xs'@(x:xs) = x : f (xs \\ [z, 2 * z]) where z = xs' !! x

A348846 a(1) = 1. For n >=2 the number k in n-th position becomes a(n) only if all terms a(1)..a(n-1) have already been defined, and if the smallest number m, greater than k, not already defined and sharing greatest prime factor (gpf) p with k is reduced to m/p.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 9, 2, 11, 4, 13, 2, 15, 2, 17, 18, 19, 4, 21, 2, 23, 8, 25, 2, 27, 4, 29, 6, 31, 2, 33, 2, 35, 12, 37, 2, 39, 40, 41, 6, 43, 4, 9, 2, 47, 16, 49, 50, 51, 4, 53, 18, 55, 8, 57, 2, 59, 12, 61, 2, 63, 2, 65, 6, 67, 4, 69, 10, 71, 24, 73, 2
Offset: 1

Views

Author

David James Sycamore, Nov 07 2021

Keywords

Comments

A limiting sequence using greatest prime factor. Each number in A000027, in natural order, is considered for admittance to the sequence. A number in n-th position at the start may be reduced several times prior to being admitted as a(n), or may not be reduced at all. Every power 2^k of 2 is reduced eventually to 2, by reduction of A007053(2^(k-1)) even semiprimes, plus 2s from reductions of smaller powers of 2.
Let [p] = {m: m a fixed point with gpf = p}, then [2] = {2}, [3] = {3,9,18,27}, [5] = {5,15,25,40,50,90}, etc. Every odd multiple of odd prime p, up to and including p^2, is necessarily a fixed point. The number of terms in [p] is limited by reduction of q-smooth numbers (q>p) to those having gpf p. Conjecture: For odd prime p, [p] is a finite set with greatest term > p^2, and <= p^3. A variant based on least prime divisors is also possible.

Examples

			After a(1) = 1, the next eligible number is 2, which becomes a(2) when 4 is reduced to 4/2 = 2.
a(3) = 3 because 6 is reduced to 2.
Next in line is 2 (previously 4), which enters as a(4) when 8 is reduced to 4.
a(5) = 5 when 10 is reduced to 2.
Next in line is 2 (previously 6) which enters as a(6) when 4 (previously 8) is reduced to 2.
a(7) = 7, and so on.
		

Crossrefs

Programs

  • Mathematica
    {1}~Join~Reap[Do[If[! IntegerQ[r[i]], Set[r[i], i]]; Which[PrimeQ[i], Set[m, 2 #],IntegerQ@ Log2[#], Block[{j = 1, k = Log2[#]}, While[r[Set[m, 2^(k + j)]] <= #, j++]], True, Block[{n = #1, k = #1/#2, j = 1}, p = #2; While[Nand[FactorInteger[#][[-1, 1]] <= p, r[#] > #] &@ Set[m, (j + k) p], j++]] & @@ {#, FactorInteger[#][[-1, 1]]}] &@ r[i]; If[IntegerQ[r[m]], r[m] /= FactorInteger[r[m]][[-1, 1]], Set[r[m], m/(FactorInteger[m][[-1, 1]])]]; Sow[r[i]], {i, 2, 120}]][[-1, -1]] (* Michael De Vlieger, Nov 07 2021 *)

Formula

a((2*m+1)*p) is a fixed point for all primes p, with m = 0,1,...,(p-1)/2.
a(2*p) = 2 for all primes p.
a(2^k) = 2 for all k >= 1.

Extensions

More terms from Michael De Vlieger, Nov 07 2021

A137838 Limiting sequence when we start with the positive integers (A000027) and delete in step n >= 1 the first digit in the term at position n + a(n).

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 10, 11, 2, 13, 4, 5, 16, 7, 8, 19, 21, 2, 23, 4, 5, 6, 7, 8, 29, 0
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 29 2008

Keywords

Examples

			First few steps are:
1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 1; delete the first digit in the term at position 1+a(1) = 2: 2;
1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 2; delete the first digit in the term at position 2+a(2) = 5: 6;
1,3,4,5,7,8,9,10,11,12,13,14,15,16,17,18,19,20,...
n = 3; delete the first digit in the term at position 3+a(3) = 7: 9;
1,3,4,5,7,8,10,11,12,13,14,15,16,17,18,19,20,...
n = 4; delete the first digit in the term at position 4+a(4) = 9: 1;
1,3,4,5,7,8,10,11,2,13,14,15,16,17,18,19,20,...
n = 5; delete the first digit in the term at position 5+a(5) = 12: 1;
1,3,4,5,7,8,10,11,2,13,14,5,16,17,18,19,20,...
n = 6; delete the first digit in the term at position 6+a(6) = 14: 1;
1,3,4,5,7,8,10,11,2,13,14,5,16,7,18,19,20,...
		

Crossrefs

A137898 Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add to the term at position n + a(n) the value of the term at position n+a(n)+1.

Original entry on oeis.org

1, 5, 3, 4, 5, 21, 15, 17, 9, 21, 11, 12, 13, 14, 15, 16, 17, 37, 19, 20, 21, 68, 23, 75, 51, 81, 55, 57, 29, 93, 63, 65, 33, 69, 35, 36, 37, 77, 39, 81, 41, 85, 43, 44, 45, 93, 47, 48
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 30 2008

Keywords

Crossrefs

Formula

Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add to the term at position n + a(n) the value of the term at position n+a(n)+1.

Extensions

Entries corrected and extended by Paolo P. Lava, Mar 10 2009

A137903 Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add to the term at position n + a(n) the value a(n) if the term is odd, else divide the term by 2.

Original entry on oeis.org

1, 1, 4, 4, 5, 6, 11, 4, 9, 5, 11, 3, 13, 14, 10, 16, 17, 18, 19, 20, 21, 11, 23, 24, 35, 13, 27, 14, 29, 30, 31, 16, 44, 17, 35, 18, 37, 19, 52, 20, 41, 35, 43, 44, 45, 23, 47, 12, 49, 50, 68, 52, 53, 45, 55, 56, 76, 29, 59, 47, 61, 31, 63, 64, 65, 66, 67, 68, 92, 35
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 30 2008

Keywords

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = [1..nn]); for (n=1, nn, my(m = n+va[n]); if (m <= nn, if (va[m] % 2, va[m]+=va[n], va[m] /= 2));); va; \\ Michel Marcus, Oct 29 2022

Extensions

Entries corrected and extended by Paolo P. Lava, Mar 10 2009
More terms from Michel Marcus, Oct 29 2022

A181109 Array whose rows result from iterating an algorithm that takes (1,1,1,1,...) to (1,3,5,7,...).

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 5, 3, 1, 1, 7, 4, 3, 1, 1, 9, 5, 4, 3, 1, 1, 11, 7, 5, 4, 3, 1, 1, 13, 8, 7, 5, 4, 3, 1, 1, 15, 10, 9, 7, 5, 4, 3, 1, 1, 17, 11, 11, 9, 7, 5, 4, 3, 1, 1, 19, 13, 12, 11, 9, 7, 5, 4, 3, 1, 1, 21, 14, 13, 12, 11, 9, 7, 5, 4, 3, 1, 1, 23, 15, 15, 13, 13, 11, 9, 7, 5, 4, 3, 1
Offset: 1

Views

Author

Clark Kimberling, Oct 03 2010

Keywords

Comments

Row 1: A000012 (constant sequence of 1's)
Row 2: A005408 (odd positive integers)
Row 3: A136119
limit-row: A003159

Examples

			Northwest corner:
1...1...1...1...1....1...1....1....1...
1...3...5...7...9...11...13...15...17...
1...3...4...5...7...8....10...11...13...
1...3...4...5...7...9....11...12...13...
		

Crossrefs

Formula

To generate row n+1 from row n, let
(row n) = (s(1), s(2), s(3), ...)
(row n+1) = (t(1), t(2), t(3), ...)
Then for k=1,2,3,..., let
t(k) = least positive integer not yet in sequences t or u
u(k) = t(k) + s(k).

A298307 Start with a(0) = 1 and add at step n >= 0 the term 1 at position floor(4*(n+a(n))/3).

Original entry on oeis.org

1, 1, 1, 0, 2, 0, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 1, 1, 0, 1, 2, 0, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 1, 1, 0, 2, 0, 1, 0, 1, 1, 2, 0, 0, 1, 2, 0, 0, 1, 1, 0, 2, 0, 1, 0, 1, 1, 2, 0, 0, 1, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 1, 2, 0, 0, 1, 1, 1, 0, 2, 0, 1, 0, 2, 0, 1, 0, 1, 2, 0, 0, 1, 1, 2, 0, 0, 1, 1, 0, 2, 0, 1, 0, 1, 2, 0, 0, 1
Offset: 0

Views

Author

Ctibor O. Zizka, Jan 16 2018

Keywords

Comments

Sum_{i=0..n} a(i)/n = 3/4. For sequences of the type: a(0) = 1, in step n >= 0 add the term 1 at position floor(k*(n+a(n))), k rational number > 1 we have Sum_{i=0..n} a(i)/n = 1/k.

Examples

			Define a sequence b whose terms are initially b(0)=1 and, for n > 0, b(n)=0, i.e., b = {1,0,0,0,0,0,0,0,0,...}; then, for n = 0,1,2,..., increment b(floor(4*(n+b(n))/3)) by 1. For n >= 0, a(n) is the final value of b(n).
                                 Sequence b after b(k) is
n b(n) k=floor(4*(n+b(n))/3)         incremented by 1
= ==== =====================  ===============================
                              {1,0,0,0,0,0,0,0,0,0,0,0,0,...}
0   1  floor(4*(0+1)/3) =  1  {1,1,0,0,0,0,0,0,0,0,0,0,0,...}
1   1  floor(4*(1+1)/3) =  2  {1,1,1,0,0,0,0,0,0,0,0,0,0,...}
2   1  floor(4*(2+1)/3) =  4  {1,1,1,0,1,0,0,0,0,0,0,0,0,...}
3   0  floor(4*(3+0)/3) =  4  {1,1,1,0,2,0,0,0,0,0,0,0,0,...}
4   2  floor(4*(4+2)/3) =  8  {1,1,1,0,2,0,0,0,1,0,0,0,0,...}
5   0  floor(4*(5+0)/3) =  6  {1,1,1,0,2,0,1,0,1,0,0,0,0,...}
6   1  floor(4*(6+1)/3) =  9  {1,1,1,0,2,0,1,0,1,1,0,0,0,...}
7   0  floor(4*(7+0)/3) =  9  {1,1,1,0,2,0,1,0,1,2,0,0,0,...}
8   1  floor(4*(8+1)/3) = 12  {1,1,1,0,2,0,1,0,1,2,0,0,1,...}
		

Crossrefs

Cf. A136119.

Programs

  • Mathematica
    mx = 104; t = Join[{1}, 0 Range@mx]; k = 1; While[4 k < 3 (mx + 2), t[[ Floor[ 4(k + t[[k]])/3]]]++; k++]; Join[{1}, t] (* Robert G. Wilson v, Jan 18 2018 *)

A355506 a(n) is the least positive integer not occurring earlier in the sequence such that, if a(m) = a(n)+1, then |m - n| >= a(n).

Original entry on oeis.org

1, 2, 4, 6, 8, 3, 10, 12, 5, 14, 16, 7, 18, 20, 22, 9, 24, 26, 11, 28, 30, 32, 13, 34, 36, 15, 38, 40, 42, 17, 44, 46, 19, 48, 50, 21, 52, 54, 56, 23, 58, 60, 25, 62, 64, 66, 27, 68, 70, 29, 72, 74, 31, 76, 78, 80, 33, 82, 84, 35, 86, 88, 90, 37, 92, 94, 39, 96, 98, 41, 100, 102, 104, 43, 106
Offset: 1

Views

Author

Ali Sada, Jul 04 2022

Keywords

Comments

A permutation of the positive integers (or of the nonnegative integers, if prefixed by a(0) = 0). It seems that all the odd numbers occur in order at indices A184119 and the even numbers occur in order at indices A136119, except for the initial 1 and 2. - M. F. Hasler, Jul 04 2022
The graph of the sequence has two "rays", one with slope 0.583 that contains only every third or fourth value, and one with slope 1.42 which contains the other values. - M. F. Hasler, May 09 2025

Examples

			The distance between a(3) = 4 and a(9) = 5 is |3 - 9| = 6, which is >= 4.
		

Crossrefs

Cf. A353592 (inverse permutation).

Programs

  • PARI
    {A355506_first(N, U=1/*starting value*/, A=Map())=vector(N, n, my(k=U); while(mapisdefined(A,k) || iferr(n < mapget(A,k-1)+k-1 || n2 && mapdelete(A,U-2); U++); k)} \\ M. F. Hasler, Jul 05 2022

Extensions

More terms from M. F. Hasler, Jul 04 2022

A138095 Limiting sequence when we start with positive integers (A000027) and at step n >= 1 add: to the term at position n + 1*a(n) the value 1, to the term at position n + 2*a(n) the value 1, ..., to the term at position n + n*a(n) the value 1.

Original entry on oeis.org

1, 3, 3, 4, 6, 7, 7, 10, 10, 10, 12, 14, 14, 15, 15, 17, 18, 19, 20, 23, 22, 22, 25, 24, 25, 27, 29, 30, 32, 32, 31, 32, 34, 35, 39, 36, 38, 39, 41, 42, 43, 43, 45, 46, 46, 46, 48, 52, 51, 53, 51, 52, 55, 55, 56, 59, 57, 60, 63, 62, 62, 64, 63, 65, 66, 68, 69, 70, 72, 71
Offset: 1

Views

Author

Ctibor O. Zizka, May 03 2008

Keywords

Examples

			        n | 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
  --------+-----------------------------------------------------------
  Step  1 |    3
  Step  2 |             6        9
  Step  3 |                7       10       13
  Step  4 |                     10          14          17          21
  Step  5 |                              12                18
  Step  6 |                                    14                   22
  Step  7 |                                       15
  Step  8 |                                                   19
  Step  9 |                                                      20
  Step 10 |                                                         23
  --------+-----------------------------------------------------------
     a(n) | 1  3  3  4  6  7  7 10 10 10 12 14 14 15 15 17 18 19 20 23
		

Crossrefs

Programs

  • PARI
    lista(nn) = my(va = [1..nn]); for (n=1, nn, for (k=1, n, my(j = n+k*va[n]); if (j <= #va, va[j]++); )); va; \\ Michel Marcus, Aug 09 2022

Extensions

Corrected and extended by Michel Marcus, Aug 09 2022
Previous Showing 11-20 of 23 results. Next