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 31-35 of 35 results.

A317326 Multiples of 26 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 26, 3, 52, 5, 78, 7, 104, 9, 130, 11, 156, 13, 182, 15, 208, 17, 234, 19, 260, 21, 286, 23, 312, 25, 338, 27, 364, 29, 390, 31, 416, 33, 442, 35, 468, 37, 494, 39, 520, 41, 546, 43, 572, 45, 598, 47, 624, 49, 650, 51, 676, 53, 702, 55, 728, 57, 754, 59, 780, 61, 806, 63, 832, 65, 858, 67, 884, 69
Offset: 0

Views

Author

Omar E. Pol, Jul 25 2018

Keywords

Comments

a(n) is the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 30-gonal numbers (A316729).
Partial sums give the generalized 30-gonal numbers.
More generally, the partial sums of the sequence formed by the multiples of m and the odd numbers interleaved, give the generalized k-gonal numbers, with m >= 1 and k = m + 4.
From Bruno Berselli, Jul 27 2018: (Start)
Also, this type of sequence is characterized by:
O.g.f.: x*(1 + m*x + x^2)/(1 - x^2)^2;
E.g.f.: x*(2 - m + (2 + m)*exp(2*x))*exp(-x)/4;
a(n) = -a(-n) = (2 + m - (2 - m)*(-1)^n)*n/4;
a(n) = (m/2)^((1 + (-1)^n)/2)*n;
a(n) = 2*a(n-2) - a(n-4), with signature (0,2,0,-1). (End)

Crossrefs

Cf. A252994 and A005408 interleaved.
Column 26 of A195151.
Sequences whose partial sums give the generalized k-gonal numbers: A026741 (k=5), A001477 (k=6), zero together with A080512 (k=7), A022998 (k=8), A195140 (k=9), zero together with A165998 (k=10), A195159 (k=11), A195161 (k=12), A195312 (k=13), A195817 (k=14), A317311 (k=15), A317312 (k=16), A317313 (k=17), A317314 (k=18), A317315 (k=19), A317316 (k=20), A317317 (k=21), A317318 (k=22), A317319 (k=23), A317320 (k=24), A317321 (k=25), A317322 (k=26), A317323 (k=27), A317324 (k=28), A317325 (k=29), this sequence (k=30).
Cf. A316729.

Programs

  • Julia
    [13^div(1+(-1)^n,2)*n for n in 0:70] |> println # Bruno Berselli, Jul 28 2018
  • Mathematica
    Table[(7 + 6 (-1)^n) n, {n, 0, 70}] (* Bruno Berselli, Jul 27 2018 *)

Formula

a(2*n) = 26*n, a(2*n+1) = 2*n + 1.
From Bruno Berselli, Jul 27 2018: (Start)
O.g.f.: x*(1 + 26*x + x^2)/(1 - x^2)^2.
E.g.f.: x*(-6 + 7*exp(2*x))*exp(-x).
a(n) = -a(-n) = (7 + 6*(-1)^n)*n.
a(n) = 13^((1 + (-1)^n)/2)*n.
a(n) = 2*a(n-2) - a(n-4). (End)
Multiplicative with a(2^e) = 13*2^e, and a(p^e) = p^e for an odd prime p. - Amiram Eldar, Oct 14 2023
Dirichlet g.f.: zeta(s-1) * (1 + 3*2^(3-s)). - Amiram Eldar, Oct 26 2023

A122750 Triangle T(n,k) = (-1)^(k+1) if n is odd, = (-1)^k if n and k are even, = 2*(-1)^k if n is even and k is odd, 0<=k<=n.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Sep 21 2006, Sep 04 2008

Keywords

Comments

The row sums of the absolute values are 1+n*(5+(-1)^n)/4 = 1+A080512(n). - R. J. Mathar, May 12 2013

Examples

			Triangle begins:
   1
  -1,  1
   1, -2,  1
  -1,  1, -1,  1
   1, -2,  1, -2,  1
  -1,  1, -1,  1, -1,  1
   1, -2,  1, -2,  1, -2,  1
		

Programs

  • Maple
    A122750 := proc(n,k)
        if type(n,'even') then
            if type(k,'even') then
                (-1)^k ;
            else
                2*(-1)^k ;
            end if;
        else
            (-1)^(k+1) ;
        end if;
    end proc: # R. J. Mathar, May 12 2013
  • Mathematica
    T[n_, k_] := If [Mod[n, 2] == 1, (-1)^(k + 1), (-1)^k*(1 + Mod[k, 2])]; a = Table[T[n, k], {n, 0, 10}, {k, 0, n}]; Flatten[a]
    (* For the unsigned version: *) t[n_, m_] = 1 + Mod[n - m, 2]*Mod[m, 2]; a = Table[t[n, m], {n, 0, 10}, {m, 0, n}]; Flatten[a] (* Roger L. Bagula, Sep 06 2008 *)

A187012 Antidiagonal sums of A103516.

Original entry on oeis.org

1, 2, 5, 4, 8, 6, 11, 8, 14, 10, 17, 12, 20, 14, 23, 16, 26, 18, 29, 20, 32, 22, 35, 24, 38, 26, 41, 28, 44, 30, 47, 32, 50, 34, 53, 36, 56, 38, 59, 40, 62, 42, 65, 44, 68, 46, 71, 48, 74, 50, 77, 52, 80, 54, 83, 56, 86, 58, 89, 60, 92, 62, 95, 64
Offset: 2

Views

Author

Michel Marcus, Aug 30 2013

Keywords

Comments

This sequence differs from A081556 at least for n=24 (see comment about n=24 in A081556).

Programs

  • Mathematica
    CoefficientList[Series[(1 + 2 x + 3 x^2 - x^4)/((1 - x)^2 (1 + x)^2), {x, 0, 40}], x] (* Vincenzo Librandi, Jun 24 2014 *)
  • PARI
    a(n) = sum(k=0, n\2, 0^(k*(n-2*k))*(n-k+1)); \\ Michel Marcus, Aug 30 2013

Formula

a(n) = sum{k=0..floor(n/2), 0^(k(n-2k))*(n-k+1)}. - Paul Barry, Aug 30 2013
G.f. : x^2*(1+2*x+3*x^2-x^4)/((1-x)^2*(1+x)^2).
a(n) = A080512(n) - 1 for n>2.

A192328 Numbers of the form 20*k+7 which are three times a square.

Original entry on oeis.org

27, 147, 507, 867, 1587, 2187, 3267, 4107, 5547, 6627, 8427, 9747, 11907, 13467, 15987, 17787, 20667, 22707, 25947, 28227, 31827, 34347, 38307, 41067, 45387, 48387, 53067, 56307, 61347, 64827, 70227, 73947, 79707, 83667, 89787, 93987
Offset: 1

Views

Author

Bruno Berselli, Jun 28 2011

Keywords

Comments

Text of the theorem in the paper mentioned in References: The necessary and sufficient condition so that a number of the form 20*k+7 is three times a square is that k is of the form 3*h*(5*h+3)+1 or 3*h*(5*h+7)+7.
A119617 gives the values of k.
A080512*120 gives the first differences.

References

  • "Supplemento al Periodico di Matematica", Raffaello Giusti Editore (Livorno) - Mar 1901 - p. 75 (Problem 286 and its generalization, G. Cardoso-Laynes).

Crossrefs

Programs

  • Magma
    [m: m in [7..10^5 by 20] | IsSquare(m/3)];
    
  • Maple
    select(t -> issqr(t/3), [seq(20*i+7,i=1..10000,3)]); # Robert Israel, Apr 28 2023
  • Mathematica
    Select[20 Range[5000] + 7, IntegerQ[Sqrt[#/3]] &] (* or *) LinearRecurrence[{1,2,-2,-1,1}, {27,147,507,867,1587}, 40] (* Harvey P. Dale, Jul 06 2011 *)
    CoefficientList[Series[3 (9 + 40 x + 102 x^2 + 40 x^3 + 9 x^4) / ((1 + x)^2 (1 - x)^3), {x, 0, 35}], x] (* Vincenzo Librandi, Aug 19 2013 *)
  • PARI
    for(k=0, 5*10^3, m=20*k+7; if(issquare(m/3), print1(m",")));
    
  • PARI
    a(n)=my(m=n--\4); 1200*m^2+[360*m+27, 840*m+147, 1560*m+507, 2040*m+867][n%4+1] \\ Charles R Greathouse IV, Jun 29 2011

Formula

G.f.: 3*x*(9 + 40*x + 102*x^2 + 40*x^3 + 9*x^4)/((1 + x)^2*(1 - x)^3).
a(n) = 3*((10*(n-1) + (-1)^(n-1) + 5)/2)^2.
a(n) = a(-n-1) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
Sum_{i=1..n} a(i) = n*(50*(n-1)*(n+1) + 15*(-1)^(n-1) + 39)/2.
a(n) = 3*A020742(A047218(n))^2.

Extensions

Offset corrected by Mohammed Yaseen, Apr 27 2023

A280167 a(2*n) = 3*n if n>0, a(2*n + 1) = -(2*n + 1), a(0) = 1.

Original entry on oeis.org

1, -1, 3, -3, 6, -5, 9, -7, 12, -9, 15, -11, 18, -13, 21, -15, 24, -17, 27, -19, 30, -21, 33, -23, 36, -25, 39, -27, 42, -29, 45, -31, 48, -33, 51, -35, 54, -37, 57, -39, 60, -41, 63, -43, 66, -45, 69, -47, 72, -49, 75, -51, 78, -53, 81, -55, 84, -57, 87, -59
Offset: 0

Views

Author

Michael Somos, Dec 27 2016

Keywords

Examples

			G.f. = 1 - x + 3*x^2 - 3*x^3 + 6*x^4 - 5*x^5 + 9*x^6 - 7*x^7 + 12*x^8 + ...
		

Crossrefs

Programs

  • Magma
    I:=[-1,3,-3,6]; [1] cat [n le 4 select I[n] else 2*Self(n-2) - Self(n-4): n in [1..30]]; // G. C. Greubel, Aug 01 2018
  • Mathematica
    a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -n, True, 3 n/2];
    a[ n_] := SeriesCoefficient[ (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4), {x, 0, n}];
    Join[{1}, LinearRecurrence[{0,2,0,-1}, {-1,3,-3,6}, 50]] (* G. C. Greubel, Aug 01 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, n%2, -n, 3*n/2)};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x) * (1 - x^10) / ((1 - x^2)^3 * (1 - x^5)) + x * O(x^n), n))};
    

Formula

b(n) = -a(n) for n > 0 is multiplicative with b(2^e) = -3 * 2^(e-1) if e > 0, b(p^e) = p^e for prime p > 2.
Euler transform of length 10 sequence [-1, 3, 0, 0, 1, 0, 0, 0, 0, -1].
G.f.: (1 - x + x^2 - x^3 + x^4) / (1 - 2*x^2 + x^4).
G.f.: (1 - x) * (1 - x^10) / ((1 - x^2)^3 * (1 - x^5)).
a(n) = (-1)^n * A257143(n). a(n) = (-1)^n * A080512(n) if n>0.
a(n) + a(n+1) = A084964(n-1) if n>0.
Previous Showing 31-35 of 35 results.