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 21-28 of 28 results.

A104738 Positions of records in A104706.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 11, 15, 17, 21, 24, 29, 30, 39, 41, 51, 54, 59, 66, 75, 77, 87, 96, 105, 107, 120, 129, 137, 141, 161, 165, 180, 186, 201, 209, 221, 227, 249, 255, 270, 285, 306, 311, 324, 336, 359, 366, 390, 401, 420, 435, 459, 465, 495, 501, 527, 534
Offset: 1

Views

Author

Zak Seidov, Mar 21 2005

Keywords

Comments

The entries in this sequence are the same as the partial sums of the independently derived A204539, for reasons unknown at present. - Colm Fagan, Jan 23 2012

Crossrefs

See A002491 for a conjectured connection to this sequence.

Programs

  • BASIC
    n=n+1; temp1=n^2; for k=(n-1) step -1 to 2; temp2=int(temp1/k); temp1=k*temp2; if int((temp2+k)/2))*2<>(temp2+k) then temp1=temp1-k; next k; a(n-1)=temp1/4 ' Colm Fagan, Nov 08 2015
    
  • MATLAB
    function [ A ] = A104738( N )
    % Produce a(1) : a(N)
    M = N;
    R = [1:M];
    v = 1;
    A = 1;
    count = 1;
    n = 1;
    while count < N
        n = n+1;
        if 2*R(1)+1 > M
            R = [R, (M+1):M+N];
        end
        R = [R(2:2*R(1)+1), R(1), R((2*R(1)+2) : M)];
        if R(1) > v
            A = [A, n];
            v = R(1);
            count = count+1;
        end
    end
    end;
    A104738(100)
  • Mathematica
    A104706 = NestList[Rest[Insert[#, #[[1]], 2 + 2 #[[1]]]]&, Range[m = 1000], m][[All, 1]];
    rec = 0; Reap[For[k = 1, k <= Length[A104706], k++, ak = A104706[[k]]; If[ak > rec, rec = ak; Sow[k]]]][[2, 1]] (* Jean-François Alcover, Apr 11 2019, after Birkas Gyorgy in A104706 *)
  • PARI
    a(n) = {n++; temp1 = n^2; forstep (k= n-1, 2, -1, temp2 = temp1\k; temp1 = k*temp2; if (((temp2+k)\2)*2 != (temp2+k), temp1 -= k)); temp1/4;} \\ after Basic; Michel Marcus, Dec 04 2015
    

Extensions

Extended by Ray Chandler, Jan 19 2012

A344009 The Tchoukaillon array of order infinity read by downward antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 6, 8, 9, 13, 10, 11, 14, 15, 19, 12, 16, 17, 21, 25, 27, 18, 20, 23, 26, 29, 31, 39, 22, 24, 28, 33, 37, 41, 43, 49, 30, 32, 35, 38, 44, 45, 51, 61, 63, 34, 36, 40, 47, 50, 55, 62, 65, 67, 79, 42, 46, 52, 53, 57, 64, 69, 73, 85, 87, 91, 48, 54, 56, 66, 68, 74, 75, 86, 89, 99, 103, 109
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2021, based on an email from Don Knuth, Jun 08 2021

Keywords

Examples

			The array begins:
1, 2, 4, 6, 10, 12, 18, 22, 30, 34, 42, 48, 58, 60, 78, 82, 102, 108, 118, 132, 150, 154, 174, 192, 210, 214, 240, 258, 274, 282, 322, 330, ...
3, 5, 8, 11, 16, 20, 24, 32, 36, 46, 54, 59, 72, 80, 90, 106, 114, 120, 142, 152, 168, 180, 198, 212, 228, 252, 270, 276, 318, 324, 334, ...
7, 9, 14, 17, 23, 28, 35, 40, 52, 56, 70, 76, 84, 94, 112, 116, 138, 144, 162, 172, 196, 202, 222, 234, 262, 272, 298, 320, 332, 342, ...
13, 15, 21, 26, 33, 38, 47, 53, 66, 71, 83, 92, 107, 113, 130, 140, 156, 166, 190, 200, 216, 232, 256, 264, 288, 312, 328, 336, 378, ...
19, 25, 29, 37, 44, 50, 57, 68, 77, 88, 96, 110, 119, 136, 148, 160, 178, 197, 204, 226, 250, 260, 275, 294, 323, 335, 358, 380, ...
27, 31, 41, 45, 55, 64, 74, 81, 95, 100, 117, 126, 143, 155, 167, 179, 203, 208, 238, 251, 268, 286, 316, 326, 354, 359, 406, ...
39, 43, 51, 62, 69, 75, 93, 98, 115, 124, 137, 153, 164, 176, 201, 206, 236, 239, 263, 280, 300, 317, 348, 356, 392, 407,
...
49, 61, 65, 73, 86, 97, 104, 122, 131, 146, 158, 173, 191, 205, 215, 237, 257, 278, 292, 310, 333, 352, 366, 400, 417, ...
...
The initial antidiagonals are:
[1],
[2, 3],
[4, 5, 7],
[6, 8, 9, 13],
[10, 11, 14, 15, 19],
[12, 16, 17, 21, 25, 27],
[18, 20, 23, 26, 29, 31, 39],
[22, 24, 28, 33, 37, 41, 43, 49],
[30, 32, 35, 38, 44, 45, 51, 61, 63],
[34, 36, 40, 47, 50, 55, 62, 65, 67, 79],
[42, 46, 52, 53, 57, 64, 69, 73, 85, 87, 91],
[48, 54, 56, 66, 68, 74, 75, 86, 89, 99, 103, 109],
[58, 59, 70, 71, 77, 81, 93, 97, 101, 105, 121, 123, 133],
[60, 72, 76, 83, 88, 95, 98, 104, 111, 125, 127, 135, 139, 147],
...
		

References

  • D. E. Knuth, Bipartite Matching, The Art of Computer Programming, Vol. 4, Pre-fascicle 14A, June 8, 2021, http://cs.stanford.edu/~knuth/fasc14a.ps.gz. See Sect. 7.5.1, Exercise 13.

Crossrefs

Rows: A002491, A344010, A344011, ...
Columns: A000960, A100287, A344012, ...

A073047 Least k such that x(k)=0 where x(1)=n and x(k)=k*floor(x(k-1)/k).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Aug 31 2002; revised May 03 2003

Keywords

Comments

Length of n-th run of consecutive identical terms is given by A028913 - Ralf Stephan.

Examples

			If x(1)=4, x(2)= 2*floor(4/2)=4, x(3)=3*floor(4/3)=3; x(4)=4*floor(3/4)=0 hence a(4)=4.
		

Crossrefs

Programs

  • Maple
    f:= proc(n,k) option remember;
      if n = 0 then return k-1 fi;
      procname(k*floor(n/k),k+1)
    end proc:
    map(f, [$1..100], 1); # Robert Israel, Jul 25 2019
  • Mathematica
    a[n_] := Module[{x}, x[1] = n; x[k_] := x[k] = k Floor[x[k-1]/k]; For[k = 1, True, k++, If[x[k] == 0, Return[k]]]];
    Array[a, 100] (* Jean-François Alcover, Jun 07 2020 *)
  • PARI
    a(n)=if(n<0,0,s=n; c=1; while(s-s%c>0,s=s-s%c; c++); c)

Formula

Presumably a(n) = sqrt(Pi*n)+O(1).

A108696 Generated by a sieve: see comments.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 19, 23, 31, 35, 43, 49, 59, 61, 79, 83, 103, 109, 119, 133, 151, 155, 175, 193, 211, 215, 241, 259, 275, 283, 323, 331, 361, 373, 403, 419, 443, 455, 499, 511, 541, 571, 613, 623, 649, 673, 719, 733, 781, 803, 841, 871, 919
Offset: 1

Views

Author

David Applegate, Oct 11 2007

Keywords

Comments

Start with the natural numbers:
1 2 3 4 5 6 7 8 9 10 11 ...
Accept the 2nd number, 2 and erase every 2nd number after it, giving:
1 2 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 ...
Accept the 3rd number, 3 and erase every 3rd number after it, giving:
1 2 3 5 7 11 13 17 19 23 25 29 31 35 ...
Accept the 4th number, 5 and erase every 4th number after it, giving:
1 2 3 5 7 11 13 19 23 25 31 35 ...
Repeat!

Crossrefs

Equals A007952 + 2 or equally A002491(n) + 1.

Programs

  • Haskell
    a108696 n = a108696_list !! (n-1)
    a108696_list = 1 : sieve' 2 [2..] where
       sieve' n (x:xs) = x : (sieve' (n+1) $ sieving xs) where
          sieving xs = (take (n-1) xs) ++ (sieving $ drop n xs)
    -- Reinhard Zumkeller, Jul 04 2011
  • Tcl
    source /tclutils/utils.tcl
    set l [range 0 10000]; set z z
    for {set i 2} {$i*2 <= [llength $l]} {incr i} {
    set k [expr {[llength $l]-1}]
    set k [expr {$k - ($k % $i)}]
    while {$k > $i} {
    set l [lreplace $l $k $k]
    incr k -$i
    }
    puts "after $i: length [llength $l], prefix [join [lrange $l 0 10] { }]"
    }
    

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

A204539 a(n) is the number of integers N=4k whose "basin" sequence (cf. comment) ends in n^2.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 4, 2, 4, 3, 5, 1, 9, 2, 10, 3, 5, 7, 9, 2, 10, 9, 9, 2, 13, 9, 8, 4, 20, 4, 15, 6, 15, 8, 12, 6, 22, 6, 15, 15, 21, 5, 13, 12, 23, 7, 24, 11, 19, 15, 24, 6, 30, 6, 26, 7, 27, 26, 13, 6, 33, 27, 30, 5, 13, 30, 30, 5, 37, 15, 26, 28, 32, 7, 17, 25, 54, 9, 30, 21, 41, 25
Offset: 2

Views

Author

Colm Fagan, Jan 16 2012

Keywords

Comments

The "basin" (analogous to river basins, for reasons set out below) is the number of positive integers N=4k which end in the "sea" at n^2. The "sea" of N is found as follows:
Starting out with N, in step i=1,2,3,..., stop if you have reached N=(i+1)^2 (the "sea" of N), otherwise set N to the next higher, odd or even (according to the parity of i), multiple of i+2, and go to step i+1.
Partial sums of this sequence appear to be A104738 (with a shift in offset). This has been confirmed for at least the first 4000 terms, but it is not at all clear why this is the case. - Ray Chandler, Jan 20 2012
After the first term, this sequence agrees with A028914 except for offset. Therefore this sequence is related to A028913, A007952, A002491 and A108696 dealing with the sieve of Tchoukaillon (or Mancala, or Kalahari). - Ray Chandler, Jan 20 2012

Examples

			For integers N=4,8,12,16,... we have the following sequences:
  {4}
  {8, 9}   (8 -> the next higher odd multiple of 3, which is 9 -> STOP)
  {12, 15, 16}  (12 -> 3*5=15 -> 4*4=16 -> STOP)
  {16, 21, 24, 25}
  {20, 21, 24, 25}
  {24, 27, 32, 35, 36}
  {28, 33, 40, 45, 48, 49}
  {32, 33, 40, 45, 48, 49}
  {36, 39, 40, 45, 48, 49}
  ...
Thus there is 1 integer N=4k ending in the sea at 2^2, whence basin a(2)=1, and idem for 3 and 4.
The two integers 16 and 20 end at 5^2, so the basin of 5 is a(5)=2.
There is again a(6)=1 integer ending in 6^2, while the basin of 7 are the 3 integers 28, 32, and 36, which all merge into the "river" that enters the "sea" in 7^2=49.
Thus the first 6 terms in the sequence are 1, 1, 1, 2, 1, 3.
Take N=100 as an example: the next integer on the same line is the next higher odd multiple of 3, i.e., smallest 3*(2m+1) > 100, which is 105. The next number is the least even multiple of 4, 4*(2m) = 112, etc., leading to 115 = 5*(2m+1), followed by 120 = 6*(2m), 133 = 7*(2m+1), 144 = 8*2m (where we have a square, but not the square of 8), 153 =9*(2m+1), 160 = 10*2m, 165 = 11*(2m+1), 168 = 12*(2m) and finally 169 = 13*13.
		

Crossrefs

Essentially the same as A028914.

Programs

  • Mathematica
    cumul[n_Integer] := Module[{den1 = n, num = n^2, den2}, While[num > 4 && den1 != 2, num = num - 1; den1 = den1 - 1; den2 = Floor[num/den1]; If[Not[EvenQ[den1 + den2]], den2 = den2 - 1]; num = den1 den2]; Return[num/4]]; basin[2] := 1; basin[n_Integer] := cumul[n] - cumul[n - 1]; Table[basin[n], {n, 2, 75}] (* Alonso del Arte, Jan 19 2012 *)
  • PARI
    bs(n,s,m=2)={while(n>m^2,n=(n\m+++2-bittest(n\m-m,0))*m; s & print1(n","));n}
    n=4; for(c=2,50, for(k=1,9e9, bs(n+=4)==c^2 || print1(k",")||break)) \\ M. F. Hasler, Jan 20 2012

A344010 Row 2 of array in A344009.

Original entry on oeis.org

3, 5, 8, 11, 16, 20, 24, 32, 36, 46, 54, 59, 72, 80, 90, 106, 114, 120, 142, 152, 168, 180, 198, 212, 228, 252, 270, 276, 318, 324, 334
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2021

Keywords

Crossrefs

A344011 Row 3 of array in A344009.

Original entry on oeis.org

7, 9, 14, 17, 23, 28, 35, 40, 52, 56, 70, 76, 84, 94, 112, 116, 138, 144, 162, 172, 196, 202, 222, 234, 262, 272, 298, 320, 332, 342
Offset: 1

Views

Author

N. J. A. Sloane, Jun 09 2021

Keywords

Crossrefs

Previous Showing 21-28 of 28 results.