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.

User: Adriano Caroli

Adriano Caroli's wiki page.

Adriano Caroli has authored 3 sequences.

A175880 a(1)=1, a(2)=2. If n >= 3: if n/2 is in the sequence, a(n)=0, otherwise a(n)=n.

Original entry on oeis.org

1, 2, 3, 0, 5, 0, 7, 8, 9, 0, 11, 12, 13, 0, 15, 0, 17, 0, 19, 20, 21, 0, 23, 0, 25, 0, 27, 28, 29, 0, 31, 32, 33, 0, 35, 36, 37, 0, 39, 0, 41, 0, 43, 44, 45, 0, 47, 48, 49, 0, 51, 52, 53, 0, 55, 0, 57, 0, 59, 60, 61, 0, 63, 0, 65, 0, 67, 68, 69, 0, 71, 0, 73, 0, 75, 76, 77, 0, 79, 80
Offset: 1

Author

Adriano Caroli, Dec 05 2010

Keywords

Comments

If n > 0 and n is in the sequence, then a(2*n) = 0. Example: 5 is in the sequence, so a(2*5) = a(10) = 0.
Is this a(n) = n*A039982(n-1), n > 1? [R. J. Mathar, Dec 07 2010]

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a175880 n = a175880_list !! (n-1)
    a175880_list = 1 : f [2..] [2..] where
       f (x:xs) (y:ys) | x == y    = x : (f xs $ delete (2*x) ys)
                       | otherwise = 0 : (f xs (y:ys))
    for_bFile = take 10000 a175880_list
    -- Reinhard Zumkeller, Feb 09 2011
  • Maple
    A110654 := proc(n) 2*n+1-(-1)^n ; %/4 ;end proc:
    A175880 := proc(n) if n <=2 then n; else if type(n,'even') then n-2*procname(A110654(n)) ; else n; end if; end if; end proc:
    seq(A175880(n),n=1..40) ; # R. J. Mathar, Dec 07 2010

Formula

a(n) = n - (1 + (-1)^n) * a((2*n + 1 - (-1)^n)/4), n >= 3.
a(n) = n - A010673(n+1)*a(A110654(n)).

A173711 Nonnegative integers, six even followed by two odd.

Original entry on oeis.org

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

Author

Adriano Caroli, Nov 25 2010

Keywords

Programs

  • Magma
    I:=[0,0,0,0,0,0,1]; [n le 7 select I[n] else Self(n-1) + Self(n-2) - Self(n-3)-Self(n-4)+Self(n-5)+Self(n-6)-Self(n-7): n in [1..80]]; // Vincenzo Librandi, Nov 24 2016
  • Mathematica
    LinearRecurrence[{1,1,-1,-1,1,1,-1},{0,0,0,0,0,0,1},50] (* G. C. Greubel, Nov 23 2016 *)
    CoefficientList[Series[x^6 / ((x + 1) (x^4 + 1) (x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 24 2016 *)
    Table[If[EvenQ[n],PadRight[{},6,n],{n,n}],{n,0,20}]//Flatten (* Harvey P. Dale, Nov 07 2020 *)

Formula

a(n) = A180969(3,n) + A180969(3,n+2).
G.f.: x^6 / ((x+1)*(x^4+1)*(x-1)^2).
a(n) = a(n-1) + a(n-2) - a(n-3) - a(n-4) + a(n-5) + a(n-6) - a(n-7). - G. C. Greubel, Nov 23 2016

A180969 Array read by antidiagonals: a(k,n) = natural numbers each repeated 2^k times.

Original entry on oeis.org

0, 1, 0, 2, 0, 0, 3, 1, 0, 0, 4, 1, 0, 0, 0, 5, 2, 0, 0, 0, 0, 6, 2, 1, 0, 0, 0, 0, 7, 3, 1, 0, 0, 0, 0, 0, 8, 3, 1, 0, 0, 0, 0, 0, 0, 9, 4, 1, 0, 0, 0, 0, 0, 0, 0, 10, 4, 2, 0, 0, 0, 0, 0, 0, 0, 0, 11, 5, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 12, 5, 2, 1, 0, 0, 0, 0
Offset: 0

Author

Adriano Caroli, Nov 17 2010

Keywords

Comments

Generalization of P. Barry's (2003) formula in A004526.

Examples

			Sequence gives the antidiagonals of the infinite square array with rows indexed by k and columns indexed by n:
0  1  2  3  4  5  6  7  8  9 10 11 12 13...
0  0  1  1  2  2  3  3  4  4   5   5   6...
0  0  0  0  1  1  1  1  2  2   2   2   3...
0  0  0  0  0  0  0  0  1  1   1   1   1...
0  0  0  0  0  0  0  0  0  0   0   0   0...
...........................................
		

Crossrefs

Programs

  • MATLAB
    function v=A180969(k,n,q)
    % n=vector of natural numbers 0,1,...,n
    % v=vector in which each n is repeated k times
    % q=q-th term of v from where to start
    if k==0;v=n+q;return;end
    v=A180969(k-1,n,q);
    % calculate repetition only if v terms are not all zeros
    if any(v); v=v/2+((-1).^v-1)/4;end
    % Adriano Caroli, Nov 28 2010
    
  • Mathematica
    Table[Floor[#/2^k] &[n - k], {n, 0, 12}, {k, 0, n}] // Flatten (* Michael De Vlieger, Sep 30 2019 *)
  • PARI
    matrix(10, 20, k, n, k--; n--; floor(n/2^k)) \\ Michel Marcus, Sep 09 2019

Formula

a(k,n) = (n/2^k) + Sum_{j=1..k} ((-1)^a(j-1,n) - 1)/2^(k-j+2).
a(k,n) = floor(n/2^k). - Adriano Caroli, Sep 30 2019