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.

A276607 Column 1 of A276620: a(n) = A276606(n) - A260723(1+n).

Original entry on oeis.org

4, 8, 10, 20, 16, 24, 38, 20, 34, 40, 36, 22, 34, 52, 52, 42, 44, 48, 48, 54, 24, 64, 74, 58, 40, 22, 64, 46, 90, 58, 66, 56, 88, 46, 40, 16, 114, 134, 32, 86, 24, 54, 68, 28, 56, 58, 86, 88, 108, 52, 56, 132, 64, 60, 148, 28, 58, 56, 120, 44, 38, 152, 72, 56, 92, 98, 96, 38, 56, 88, 38, 46, 92, 180, 40, 80, 54, 126
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2016

Keywords

Crossrefs

Column 1 of A276620.
Cf. A276608 (terms divided by 2).

Programs

Formula

a(n) = A276606(n) - A260723(1+n).

A003309 Ludic numbers: apply the same sieve as Eratosthenes, but cross off every k-th remaining number.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 23, 25, 29, 37, 41, 43, 47, 53, 61, 67, 71, 77, 83, 89, 91, 97, 107, 115, 119, 121, 127, 131, 143, 149, 157, 161, 173, 175, 179, 181, 193, 209, 211, 221, 223, 227, 233, 235, 239, 247, 257, 265, 277, 283, 287, 301, 307, 313
Offset: 1

Views

Author

Keywords

Comments

The definition can obviously only be applied from k = a(2) = 2 on: for k = 1, all remaining numbers would be deleted. - M. F. Hasler, Nov 02 2024

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Without the initial 1 occurs as the leftmost column in arrays A255127 and A260717.
Cf. A003310, A003311, A100464, A100585, A100586 (variants).
Cf. A192503 (primes in sequence), A192504 (nonprimes), A192512 (number of terms <= n).
Cf. A192490 (characteristic function).
Cf. A192607 (complement).
Cf. A260723 (first differences).
Cf. A255420 (iterates of f(n) = A003309(n+1) starting from n=1).
Subsequence of A302036.
Cf. A237056, A237126, A237427, A235491, A255407, A255408, A255421, A255422, A260435, A260436, A260741, A260742 (permutations constructed from Ludic numbers).
Cf. also A000959, A008578, A255324, A254100, A272565 (Ludic factor of n), A297158, A302032, A302038.
Cf. A376237 (ludic factorial: cumulative product), A376236 (ludic Fortunate numbers).

Programs

  • Haskell
    a003309 n = a003309_list !! (n - 1)
    a003309_list = 1 : f [2..] :: [Int]
       where f (x:xs) = x : f (map snd [(u, v) | (u, v) <- zip [1..] xs,
                                                 mod u x > 0])
    -- Reinhard Zumkeller, Feb 10 2014, Jul 03 2011
    
  • Maple
    ludic:= proc(N) local i, k,S,R;
      S:= {$2..N};
      R:= 1;
      while nops(S) > 0 do
        k:= S[1];
        R:= R,k;
        S:= subsop(seq(1+k*j=NULL, j=0..floor((nops(S)-1)/k)),S);
      od:
    [R];
    end proc:
    ludic(1000); # Robert Israel, Feb 23 2015
  • Mathematica
    t = Range[2, 400]; r = {1}; While[Length[t] > 0, k = First[t]; AppendTo[r, k]; t = Drop[t, {1, -1, k}];]; r (* Ray Chandler, Dec 02 2004 *)
  • PARI
    t=vector(399,x,x+1); r=[1]; while(length(t)>0, k=t[1];r=concat(r,[k]);t=vector((length(t)*(k-1))\k,x,t[(x*k+k-2)\(k-1)])); r \\ Phil Carmody, Feb 07 2007
    
  • PARI
    A3309=[1]; next_A003309(n)=nn && break); n+!if(n=setsearch(A3309,n+1,1),return(A3309[n])) \\ Should be made more efficient if n >> max(A3309). - M. F. Hasler, Nov 02 2024
    {A003309(n) = while(n>#A3309, next_A003309(A3309[#A3309])); A3309[n]} \\ Should be made more efficient in case n >> #A3309. - M. F. Hasler, Nov 03 2024
    
  • PARI
    upto(nn)= my(r=List([1..nn]), p=1); while(p++<#r, my(k=r[p], i=p); while((i+=k)<=#r, listpop(~r, i); i--)); Vec(r); \\ Ruud H.G. van Tol, Dec 13 2024
    
  • Python
    remainders = [0]
    ludics = [2]
    N_MAX = 313
    for i in range(3, N_MAX) :
        ludic_index = 0
        while ludic_index < len(ludics) :
            ludic = ludics[ludic_index]
            remainder = remainders[ludic_index]
            remainders[ludic_index] = (remainder + 1) % ludic
            if remainders[ludic_index] == 0 :
                break
            ludic_index += 1
        if ludic_index == len(ludics) :
            remainders.append(0)
            ludics.append(i)
    ludics = [1] + ludics
    print(ludics)
    # Alexandre Herrera, Aug 10 2023
    
  • Python
    def A003309(): # generator of the infinite list of ludic numbers
        L = [2, 3]; yield 1; yield 2; yield 3
        while k := len(L)//2: # could take min{k | k >= L[-1-k]-1}
            for j in L[-1-k::-1]: k += 1 + k//(j-1)
            L.append(k+2); yield k+2
    A003309_upto = lambda N=99: [t for t,_ in zip(A003309(),range(N))]
    # M. F. Hasler, Nov 02 2024
  • Scheme
    (define (A003309 n) (if (= 1 n) n (A255127bi (- n 1) 1))) ;; Code for A255127bi given in A255127.
    ;; Antti Karttunen, Feb 23 2015
    

Formula

Complement of A192607; A192490(a(n)) = 1. - Reinhard Zumkeller, Jul 05 2011
From Antti Karttunen, Feb 23 2015: (Start)
a(n) = A255407(A008578(n)).
a(n) = A008578(n) + A255324(n).
(End)

Extensions

More terms from David Applegate and N. J. A. Sloane, Nov 23 2004

A276610 Square array A(row,col) = A255127(row+1,col) - A255127(row,col): the first differences of each column of Ludic array, read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

1, 5, 2, 9, 10, 2, 13, 20, 12, 4, 17, 28, 24, 24, 2, 21, 38, 36, 44, 18, 4, 25, 46, 48, 66, 30, 28, 6, 29, 56, 58, 90, 46, 54, 44, 2, 33, 64, 68, 114, 60, 84, 84, 22, 4, 37, 74, 82, 136, 74, 104, 122, 40, 38, 8, 41, 82, 92, 152, 86, 136, 156, 54, 60, 48, 4, 45, 92, 102, 174, 106, 162, 194, 76, 94, 116, 40, 2
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2016

Keywords

Comments

Not all rows are monotonic. See A276620 for their first differences.

Examples

			The top left 16 x 15 corner of the array:
1,  5,   9,  13,  17,  21,  25,  29,  33,  37,  41,  45,  49,  53,  57,  61
2, 10,  20,  28,  38,  46,  56,  64,  74,  82,  92, 100, 110, 118, 128, 136
2, 12,  24,  36,  48,  58,  68,  82,  92, 102, 114, 126, 138, 148, 158, 172
4, 24,  44,  66,  90, 114, 136, 152, 174, 202, 222, 244, 264, 284, 310, 330
2, 18,  30,  46,  60,  74,  86, 106, 120, 128, 150, 162, 174, 192, 204, 216
4, 28,  54,  84, 104, 136, 162, 180, 210, 238, 260, 288, 318, 346, 366, 396
6, 44,  84, 122, 156, 194, 234, 282, 316, 348, 388, 428, 464, 504, 548, 584
2, 22,  40,  54,  76,  90, 102, 122, 144, 164, 180, 198, 210, 230, 240, 264
4, 38,  60,  94, 120, 150, 190, 210, 240, 270, 302, 330, 364, 390, 430, 456
8, 48, 116, 162, 236, 288, 336, 406, 446, 510, 576, 622, 680, 738, 786, 844
4, 40,  76, 104, 136, 166, 194, 212, 270, 298, 318, 356, 382, 412, 462, 492
2, 24,  38,  52,  62, 108, 124, 148, 150, 182, 198, 222, 242, 260, 272, 300
4, 38,  70, 116, 148, 164, 210, 240, 270, 300, 354, 388, 414, 448, 474, 504
6, 58, 102, 142, 194, 234, 290, 348, 408, 436, 460, 524, 576, 630, 696, 726
8, 60, 134, 204, 256, 322, 390, 446, 498, 578, 642, 684, 774, 828, 870, 948
		

Crossrefs

Transpose: A276609.
Row 1: A016813.
Column 1: A260723 (from the second 1 onward), Column 2: A276606.
Cf. also arrays A257257, A257513 and A276620 (gives the first differences of each row).

Programs

Formula

A(row,col) = A255127(row+1,col) - A255127(row,col).
A(row,col) = A269379(A255127(row,col)) - A255127(row,col).

A350004 Iterated differences of ludic numbers. Array read by antidiagonals, n >= 0, k >= 1: T(0,k) = A003309(k), T(n,k) = T(n-1,k+1)-T(n-1,k) for n > 0.

Original entry on oeis.org

1, 2, 1, 3, 1, 0, 5, 2, 1, 1, 7, 2, 0, -1, -2, 11, 4, 2, 2, 3, 5, 13, 2, -2, -4, -6, -9, -14, 17, 4, 2, 4, 8, 14, 23, 37, 23, 6, 2, 0, -4, -12, -26, -49, -86, 25, 2, -4, -6, -6, -2, 10, 36, 85, 171, 29, 4, 2, 6, 12, 18, 20, 10, -26, -111, -282
Offset: 0

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Examples

			Array begins:
  n\k|    1    2    3   4    5   6    7    8   9   10
  ---+-----------------------------------------------
   0 |    1    2   3    5    7  11   13   17  23   25
   1 |    1    1   2    2    4   2    4    6   2    4
   2 |    0    1   0    2   -2   2    2   -4   2    4
   3 |    1   -1   2   -4    4   0   -6    6   2   -8
   4 |   -2    3  -6    8   -4  -6   12   -4 -10   10
   5 |    5   -9  14  -12   -2  18  -16   -6  20   -8
   6 |  -14   23 -26   10   20 -34   10   26 -28    2
   7 |   37  -49  36   10  -54  44   16  -54  30    8
   8 |  -86   85 -26  -64   98 -28  -70   84 -22  -26
   9 |  171 -111 -38  162 -126 -42  154 -106  -4   64
  10 | -282   73 200 -288   84 196 -260  102  68 -142
		

Crossrefs

Cf. A003309 (row n = 0), A260723 (row n = 1).
Cf. A095195 (iterated differences of primes), A350001 (iterated differences of lucky numbers).

Formula

T(n,k) = Sum_{j=0..n} (-1)^(n-j)*binomial(n,j)*A003309(k+j).

A276606 First differences of postludic numbers: a(n) = A254100(1+n) - A254100(n).

Original entry on oeis.org

5, 10, 12, 24, 18, 28, 44, 22, 38, 48, 40, 24, 38, 58, 60, 48, 48, 54, 54, 60, 26, 70, 84, 66, 44, 24, 70, 50, 102, 64, 74, 60, 100, 48, 44, 18, 126, 150, 34, 96, 26, 58, 74, 30, 60, 66, 96, 96, 120, 58, 60, 146, 70, 66, 164, 30, 64, 60, 132, 50, 40, 168, 78, 62, 100, 108, 104, 42, 58, 98, 40, 50, 100, 198, 44, 88, 60, 138, 60
Offset: 1

Views

Author

Antti Karttunen, Sep 13 2016

Keywords

Crossrefs

Column 2 of A276610.
Cf. also A260723, A276607.

Programs

Formula

a(n) = A254100(1+n) - A254100(n).
a(n) = A260723(1+n) + A276607(n).

A260722 Difference between n-th odd Ludic and n-th Lucky number: a(1) = 0; for n > 1: a(n) = A003309(n+1) - A000959(n).

Original entry on oeis.org

0, 0, -2, -2, -2, -2, -4, -2, -6, -4, 0, -2, -6, -4, -10, -6, -2, -2, 2, 4, 2, -2, -2, 2, 4, 4, -6, -2, -2, 8, 8, 6, 2, 10, 6, 8, -8, 0, 14, 10, 16, 12, 8, 10, 4, 4, 10, 16, 6, 16, 16, 14, 18, 22, 24, 32, 28, 30, 22, 32, 32, 30, 38, 34, 32, 36, 40, 30, 28, 28, 32, 24, 22, 24, 36, 38, 42, 30, 30, 22, 26, 26, 30, 38, 40, 30, 36, 46, 48, 46, 56, 54, 54, 54, 40, 46
Offset: 1

Views

Author

Antti Karttunen, Aug 06 2015

Keywords

Comments

Equally: for n >= 2, the difference between (n+1)-th Ludic and n-th Lucky number.

Crossrefs

Cf. A000959, A003309, A031883, A260721 (same terms divided by two), A260723, A256486, A256487.
Cf. also permutations A260435, A260436, A260741, A260742.

Programs

Formula

a(1) = 0; for n > 1: a(n) = A003309(n+1) - A000959(n).
Other identities. For all n >= 2:
a(n) = A256486(n) + A260723(n).
a(n) = A256486(n+1) + A031883(n).

A350005 a(n) is the smallest number that starts an arithmetic progression of n consecutive ludic numbers (A003309), or 0 if no such number exists.

Original entry on oeis.org

1, 1, 1, 71, 6392047
Offset: 1

Views

Author

Pontus von Brömssen, Dec 08 2021

Keywords

Comments

a(n) is the smallest ludic number A003309(k), such that A260723(k) = A260723(k+1) = ... = A260723(k+n-2).
a(6) > 10^8 (unless a(6) = 0).

Examples

			The first arithmetic progression of 3 consecutive ludic numbers is (1, 2, 3), so a(3) = 1.
The first arithmetic progression of 4 consecutive ludic numbers is (71, 77, 83, 89), so a(4) = 71.
The first arithmetic progression of 5 consecutive ludic numbers is (6392047, 6392077, 6392107, 6392137, 6392167), so a(5) = 6392047.
		

Crossrefs

From n = 3, first row of A350007.
Counterparts for other sequences than ludic numbers: A006560 (primes), A228433 (abundant numbers), A231623 (deficient numbers), A276821 (Sophie Germain primes), A330362 (lucky numbers).
Showing 1-7 of 7 results.