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-5 of 5 results.

A007952 Generated by a sieve: keep first number, drop every 2nd, keep first, drop every 3rd, keep first, drop every 4th, etc.

Original entry on oeis.org

0, 1, 3, 5, 9, 11, 17, 21, 29, 33, 41, 47, 57, 59, 77, 81, 101, 107, 117, 131, 149, 153, 173, 191, 209, 213, 239, 257, 273, 281, 321, 329, 359, 371, 401, 417, 441, 453, 497, 509, 539, 569, 611, 621, 647, 671, 717, 731, 779, 801, 839, 869, 917, 929, 989, 1001, 1053, 1067
Offset: 0

Views

Author

N. J. A. Sloane, R. Muller

Keywords

Comments

Also called the sieve of Tchoukaillon (or Mancala, or Kalahari).
If k+1 occurs at rank i for the first time, then i is given by the program: i = 0: for j = k to 1 step -1: i = 1 + i + int ( i / j ): next: - Claude Lenormand (claude.lenormand(AT)free.fr), Jan 15 2001
A082447(n+1) = (number of terms <= n); see A141262 for primes. - Reinhard Zumkeller, Jun 21 2008

References

  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11 (1957), 26-31.
  • M. Le, On the Smarandache n-ary Sieve, Smarandache Notions Journal, Vol. 10, No. 1-2-3, 1999, 146-147.

Crossrefs

Programs

  • Haskell
    a007952 n = a007952_list !! n
    a007952_list = f 1 [0..] where
       f k (x:xs) = x : f (k + 1) (g xs) where
         g ws = us ++ (g vs) where (us, _:vs) = splitAt k ws
    -- Reinhard Zumkeller, Jan 19 2014
    
  • Mathematica
    f[n_] := Fold[#2*Floor[#1/#2 + 1] &, n, Reverse@ Range[n - 1]]; Array[f, 55] (* From David Wilson *)
  • PARI
    a(n) = my(ret=0); forstep(k=n,1,-1, ret++; ret+=(-ret)%k); ret; \\ Kevin Ryde, Sep 30 2022

Formula

Equals A002491(n) - 1. Equals A108696 - 2.

Extensions

Corrected and extended by David W. Wilson

A028913 First differences of A007952.

Original entry on oeis.org

1, 2, 2, 4, 2, 6, 4, 8, 4, 8, 6, 10, 2, 18, 4, 20, 6, 10, 14, 18, 4, 20, 18, 18, 4, 26, 18, 16, 8, 40, 8, 30, 12, 30, 16, 24, 12, 44, 12, 30, 30, 42, 10, 26, 24, 46, 14, 48, 22, 38, 30, 48, 12, 60, 12, 52, 14, 54, 52, 26, 12, 66, 54, 60, 10, 26, 60, 60, 10, 74, 30, 52, 56, 64, 14, 34
Offset: 0

Views

Author

Keywords

Crossrefs

Extensions

More terms from Reinhard Zumkeller, Jun 21 2008

A130747 A self-referential sequence related to Mancala solitaire (see comment).

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 2, 9, 1, 10, 4, 11, 1, 12, 2, 13, 5, 14, 3, 15, 1, 16, 6, 17, 1, 18, 2, 19, 7, 20, 4, 21, 1, 22, 8, 23, 3, 24, 1, 25, 9, 26, 5, 27, 2, 28, 10, 29, 1, 30, 1, 31, 11, 32, 6, 33, 4, 34, 12, 35, 3, 36, 2, 37, 13, 38, 7, 39, 1, 40, 14, 41
Offset: 1

Views

Author

Benoit Cloitre, Jul 12 2007

Keywords

Comments

To build the sequence, start from:
1,,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
At the n-th step use the rule: " fill a(n)-th hole with a(n) " (holes are numbered from 1 at each step)
So step 1 is "fill first hole with 1", giving:
1,1,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,_,...
Since a(2)=1, step 2 is still "fill first hole with 1", giving:
1,1,2,1,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
Since a(3)=2, step 3 is "fill second hole with 2", giving:
1,1,2,1,3,,4,2,5,,6,,7,,8,,9,,10,,11,,12,_,...
Since a(4)=1, step 4 is "fill first hole with 1", giving:
1,1,2,1,3,1,4,2,5,,6,,7,,8,,9,,10,,11,,12,,...
Since a(5)=3, step 5 is "fill third hole with 3", giving:
1,1,2,1,3,1,4,2,5,,6,,7,3,8,,9,,10,,11,,12,_,...
Iterating the process indefinitely yields:
1,1,2,1,3,1,4,2,5,1,6,1,7,3,8,2,9,1,10,4,11,1,12,2,13,5,...
Indices where 1's occur are n=1,2,4,6,10,... which are the smallest number of stones in Mancala solitaire which make use of the n-th hole. If f(k) denotes this sequence then lim_{k->oo} k^2/f(k) = Pi.
Ordinal transform of A028920. - Benoit Cloitre, Aug 03 2007
Although A028920 and A130747 are not fractal sequences (according to Kimberling's definition) we say they are "mutual fractal sequences" since the ordinal transform of one gives the other. - Benoit Cloitre, Aug 03 2007
a(A002491(n)) = 1. - Reinhard Zumkeller, Jun 23 2009
A082447(n) = number of ones <= n. - Reinhard Zumkeller, Jul 01 2009
From Benoit Cloitre, Jul 17 2022: (Start)
Another way (less self-referent) to construct the sequence.
Step 1: Let's start from the integers separated by a hole:
1,,2,,3,,4,,5,,6,,7,,8,,9,,10,,11,,12,,...
Step 2: Put integers in the holes leaving 2 holes between each integer giving:
1,*1*,2,,3,,4,*2*,5,,6,,7,*3*,8,,9,,10,*4*,11,,12,,...
Step 3: Put integers in the holes leaving 3 holes between each integer giving:
1,1,2,*1*,3,,4,2,5,,6,,7,3,8,*2*,9,,10,4,11,,12,,...
Step 4: Put integers in the holes leaving 4 holes between each integer giving:
1,1,2,1,3,*1*,4,2,5,,6,,7,3,8,2,9,,10,4,11,,12,*2*,...
Iterating the process yields the sequence
1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 2, 9, 1, 10, 4, 11, 1, 12, 2,... (End)

References

  • Benoit Cloitre, Pi in a hole, in preparation, 2007
  • Y. David, On a sequence generated by a sieving process, Riveon Lematematika, 11(1957), 26-31.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, Section 1.4.7.

Crossrefs

Cf. A002491.

Programs

A140060 Array of quotients.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 4, 3, 5, 4, 3, 6, 6, 6, 4, 7, 6, 6, 4, 8, 8, 6, 4, 9, 8, 6, 4, 10, 10, 9, 8, 5, 11, 10, 9, 8, 5, 12, 12, 12, 12, 10, 6, 13, 12, 12, 12, 10, 6, 14, 14, 12, 12, 10, 6, 15, 14, 12, 12, 10, 6, 16, 16, 15, 12, 10, 6, 17, 16, 15, 12, 10, 6, 18, 18, 18, 16, 15, 12, 7, 19, 18, 18
Offset: 1

Views

Author

Clark Kimberling, May 03 2008

Keywords

Comments

1. k divides Q(n,k) for each k.
2. The numbers in row n are distinct if and only if n is a term of the Sieve of Tchoukaillon (or Mancala, or Kalahari), A007952.

Examples

			First 8 rows:
1
2 2
3 2
4 4 3
5 4 3
6 6 6 4
7 6 6 4
8 8 6 4
For row 5: Q(5,1)=5, Q(5,2)=2*[5/2]=4, Q(5,3)=3*[4/3]=3.
		

Crossrefs

Cf. A140061.

Formula

For n>=1, for k=1,2,...,A082447(n), Q(n,1)=n, Q(n,k)=k*Floor(Q(n,k-1)/k).

A140061 Triangle of quotients.

Original entry on oeis.org

1, 3, 2, 5, 4, 3, 9, 8, 6, 4, 11, 10, 9, 8, 5, 17, 16, 15, 12, 10, 6, 21, 20, 18, 16, 15, 12, 7, 29, 28, 27, 24, 20, 18, 14, 8, 33, 32, 30, 28, 25, 24, 21, 16, 9, 41, 40, 39, 36, 35, 30, 28, 24, 18, 10, 47, 46, 45, 44, 40, 36, 35, 32, 27, 20, 11, 57, 56, 54, 52, 50, 48, 42, 40, 36
Offset: 1

Views

Author

Clark Kimberling, May 03 2008

Keywords

Comments

Column 1 is essentially A007952. - Clark Kimberling, Aug 27 2008

Examples

			First 6 rows:
1
3 2
5 4 3
9 8 6 4
11 10 9 8 5
17 16 15 12 10 6
		

Crossrefs

Cf. A140060.
Cf. A007952.

Programs

  • Mathematica
    Flatten@Table[Reverse@FoldList[#2*Floor[#1/#2+1]&,i,Reverse@Range[i-1]],{i,10}] (* Birkas Gyorgy, Feb 26 2011 *)

Formula

The triangular subarray of A140060 consisting of rows whose terms are distinct. If n is the first term in a row (i.e., if n is a term of A082447), then Q(n,1)=n, Q(n,k)=k*Floor(Q(n,k-1)/k).
Showing 1-5 of 5 results.