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 11-20 of 27 results. Next

A139421 a(1)=1; for n>1, a(n) = largest prime divisor of n!!.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 3, 7, 5, 11, 5, 13, 7, 13, 7, 17, 7, 19, 7, 19, 11, 23, 11, 23, 13, 23, 13, 29, 13, 31, 13, 31, 17, 31, 17, 37, 19, 37, 19, 41, 19, 43, 19, 43, 23, 47, 23, 47, 23, 47, 23, 53, 23, 53, 23, 53, 29, 59, 29, 61, 31, 61, 31, 61, 31, 67, 31, 67, 31, 71, 31, 73, 37
Offset: 1

Views

Author

Artur Jasinski, Apr 21 2008

Keywords

Crossrefs

Cf. A010693.

Programs

  • Mathematica
    a = {}; Do[b = First[Last[FactorInteger[n!! ]]]; AppendTo[a, b], {n, 2, 100}]; a
    FactorInteger[#][[-1,1]]&/@(Range[80]!!) (* Harvey P. Dale, Feb 15 2014 *)

Formula

a(n) = A006530(A006882(n)). - Michel Marcus, Nov 08 2013

A174296 Row sums of A174294.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2
Offset: 0

Views

Author

Mats Granvik, Mar 15 2010

Keywords

Crossrefs

Programs

  • Magma
    [n lt 2 select (n+1) else 2 + (n mod 2): n in [0..110]]; // G. C. Greubel, Nov 25 2021
    
  • Mathematica
    Table[If[n<2, n+1, (5-(-1)^n)/2], {n,0,110}] (* G. C. Greubel, Nov 25 2021 *)
  • Sage
    [1,2]+[(5-(-1)^n)/2 for n in (2..110)] # G. C. Greubel, Nov 25 2021

Formula

a(A004280(n)) = 3 for n > 2.
From G. C. Greubel, Nov 25 2021: (Start)
a(n) = a(n-2) for n > 3, with a(0) = 1, a(1) = 2, a(2) = 2, a(3) = 3.
a(n) = (5 - (-1)^n)/2 for n > 1, with a(0) = 1, a(1) = 2.
a(n) = (n+1)*[n<2] + A010693(n)*[n>1].
G.f.: (1_+ 2*x + x^2 + x^3)/(1 - x^2).
E.g.f.: (1/2)*( -exp(-x) - 2*(1+x) + 5*exp(x) ). (End)

A195033 Multiples of 21 and of 20 interleaved: a(2n-1) = 21n, a(2n) = 20n.

Original entry on oeis.org

21, 20, 42, 40, 63, 60, 84, 80, 105, 100, 126, 120, 147, 140, 168, 160, 189, 180, 210, 200, 231, 220, 252, 240, 273, 260, 294, 280, 315, 300, 336, 320, 357, 340, 378, 360, 399, 380, 420, 400, 441, 420, 462, 440, 483, 460, 504, 480, 525, 500, 546, 520, 567, 540
Offset: 1

Views

Author

Omar E. Pol, Sep 12 2011

Keywords

Comments

First differences of A195034.
a(n) is also the length of the n-th edge of a square spiral in which the first two edges are the legs of the primitive Pythagorean triple [21, 20, 29]. Zero together with partial sums give A195034, the vertices of the spiral.

Crossrefs

Programs

Formula

From Bruno Berselli, Sep 29 2011: (Start)
G.f.: x*(21+20*x)/((1-x)^2*(1+x)^2).
a(n) = A010693(n)*A010718(n)*A029578(n+1) = (41*n-(n+21)*(-1)^n+21)/4.
a(n) = 2*a(n-2) - a(n-4). (End)

Extensions

More terms from Bruno Berselli, Sep 29 2011

A010711 Period 2: repeat (4,6).

Original entry on oeis.org

4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4
Offset: 0

Views

Author

Keywords

Programs

Formula

a(n)=-(-1)^n+5. Paolo P. Lava, Oct 20 2006
G.f.: -2*(2+3*x)/((x-1)*(1+x)).
a(n) = 2*A010693(n).

Extensions

First formula corrected by Paolo P. Lava, Mar 14 2011

A128315 Inverse Moebius transform of signed A007318.

Original entry on oeis.org

1, 0, 1, 2, -2, 1, -1, 4, -3, 1, 2, -4, 6, -4, 1, 0, 4, -9, 10, -5, 1, 2, -6, 15, -20, 15, -6, 1, -2, 11, -24, 36, -35, 21, -7, 1, 3, -10, 29, -56, 70, -56, 28, -8, 1, 0, 6, -30, 80, -125, 126, -84, 36, -9, 1, 2, -10, 45, -120, 210, -252, 210, -120, 45, -10, 1, -2, 18, -67, 176, -335, 463, -462, 330, -165, 55, -11, 1
Offset: 1

Views

Author

Gary W. Adamson, Feb 25 2007

Keywords

Comments

Examples

			First few rows of the triangle:
   1;
   0,  1;
   2, -2,  1;
  -1,  4, -3,  1;
   2, -4,  6, -4,  1;
   0,  4, -9, 10, -5, 1;
  ...
		

Crossrefs

Programs

  • Magma
    A128315:= func< n,k | (&+[0^(n mod j)*(-1)^(k+j)*Binomial(j-1, k-1): j in [k..n]]) >;
    [A128315(n,k): k in [1..n], n in [1..15]]; // G. C. Greubel, Jun 22 2024
    
  • Mathematica
    A128315[n_, k_]:= (-1)^k*DivisorSum[n, (-1)^#*Binomial[#-1, k-1] &];
    Table[A128315[n,k], {n,15}, {k,n}]//Flatten (* G. C. Greubel, Jun 22 2024 *)
  • SageMath
    def A128315(n,k): return sum( 0^(n%j)*(-1)^(k+j)*binomial(j-1,k-1) for j in range(k,n+1))
    flatten([[A128315(n,k) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Jun 22 2024

Formula

T(n, k) = A051731(n, k) * A130595(n-1, k-1) as infinite lower triangular matrices.
T(n, 1) = A048272(n).
Sum_{k=1..n} T(n, k) = A000012(n) = 1 (row sums).
From G. C. Greubel, Jun 22 2024: (Start)
T(n, k) = (-1)^k * Sum_{d|n} (-1)^d * binomial(d-1, k-1).
T(n, 2) = A325940(n), n >= 2.
T(n, 3) = A363615(n), n >= 3.
T(n, 4) = A363616(n), n >= 4.
T(2*n-1, n) = (-1)^(n-1)*A000984(n-1), n >= 1.
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A081295(n).
Sum_{k=1..n} k*T(n, k) = A000034(n-1), n >= 1.
Sum_{k=1..n} (k+1)*T(n, k) = A010693(n-1), n >= 1. (End)

Extensions

a(43) = 28 inserted and more terms from Georg Fischer, Jun 05 2023

A109827 Numbers written in an alternating binary-then-ternary base.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 100, 101, 110, 111, 120, 121, 1000, 1001, 1010, 1011, 1020, 1021, 1100, 1101, 1110, 1111, 1120, 1121, 2000, 2001, 2010, 2011, 2020, 2021, 2100, 2101, 2110, 2111, 2120, 2121, 10000, 10001, 10010, 10011, 10020, 10021, 10100, 10101
Offset: 0

Views

Author

Rick L. Shepherd, Jul 03 2005

Keywords

Comments

Exercise 14 on page 30 of the Long textbook is "Let m_1, m_2, m_3 ... be an infinite sequence of integers such that m_i >= 2 for all i. Let M_0 = 1 and M_i = Product_{j=1..i} m_j for all i >= 1. Show that every nonnegative integer r can be written uniquely in the form r = c_n M_n + c_(n-1) M_(n-1) + ... + c_1 M_1 + c_0 where c_n <> 0 for r <> 0 and 0 <= c_i < m_(i+1) for all i." The current sequence of terms a(r) = (c_n c_(n-1) ... c_1 c_0 concatenated) is one example of an infinite family of hybrid representations (just using only 2 and 3). For the m_i, this sequence uses A010693. Then the corresponding M_i are A026549. Thus the places reading from right have values (1,2,2*3,2*3*2,2*3*2*3,...) = A026549. The (ternary) digit 2 may only appear in the even positions counting from the rightmost as position 1. Appending "00" to any term multiplies the number by 6.
However, appending a single "0" to a term multiplies the number by 2 or by 3 or produces an invalid string of digits -- or even none of the above (110 => 1100, 8 becomes 18) -- depending upon the original number and its length.

Examples

			a(29) = 2021 as 29 = 2*12 + 0*6 + 2*2 + 1*1.
		

References

  • Calvin T. Long, Elementary Introduction to Number Theory, 2nd ed., D.C. Heath and Company, 1972, p. 30.

Crossrefs

Cf. A010693 (2, 3, 2, 3, ...), A026549 (place values), A089293 (sum of digits).
Cf. A055643 (Babylonian numbers), A007623 (numbers in factorial base), A049345 (numbers in primorial base), A007088 (numbers in base 2: binary), A007089 (numbers in base 3: ternary).

Programs

  • PARI
    my(table=[0,1,10,11,20,21]); a(n) = fromdigits(apply(d->table[d+1], digits(n,6)), 100); \\ Kevin Ryde, Aug 03 2021
    
  • PARI
    A010693(n) = if(n%2, 2, 3) \\ Function m is A010693 with index 1 here.
    {\\ The function b(n, m) works for all nonnegative n and every sequence m of (mixed or constant) radices as described above.
    my(c, d, k, ntmp, p, v, x); b(n, m) = if(n < 0, , v = [1]; k = 0;
    while(1, k++; p = v[#v]*m(k); if(p <= n, v = concat(v, p), break));
    ntmp = n; c = [];
    forstep(i = #v, 1, -1, d = ntmp\v[i]; c = concat(c, d); ntmp = ntmp - d*v[i]);
    x = 10; if(vecmax(c) < x, eval(Pol(c, 'x)), c))
    \\ returned value is a vector of decimal coefficients if any calculated
    \\ digit is larger than 9 (i.e., not suitable as an OEIS term)
    }
    a(n) = b(n, A010693) \\ Rick L. Shepherd, Aug 04 2021
  • Python
    a109827 = lambda n: 100 * a109827(n // 6) + 10 * ((n % 6) // 2) + n % 2 if n else 0 # David Radcliffe, Aug 03 2021
    

A274912 Square array read by antidiagonals upwards in which each new term is the least nonnegative integer distinct from its neighbors.

Original entry on oeis.org

0, 1, 2, 0, 3, 0, 1, 2, 1, 2, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 3, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2
Offset: 0

Views

Author

Omar E. Pol, Jul 11 2016

Keywords

Comments

In the square array we have that:
Antidiagonal sums give A168237.
Odd-indexed rows give A010673.
Even-indexed rows give A010684.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed antidiagonals give the initial terms of A010674.
Even-indexed antidiagonals give the initial terms of A000034.
Main diagonal gives A010674.
This is also a triangle read by rows in which each new term is the least nonnegative integer distinct from its neighbors.
In the triangle we have that:
Row sums give A168237.
Odd-indexed columns give A000035.
Even-indexed columns give A010693.
Odd-indexed diagonals give A010673.
Even-indexed diagonals give A010684.
Odd-indexed rows give the initial terms of A010674.
Even-indexed rows give the initial terms of A000034.
Odd-indexed antidiagonals give the initial terms of A010673.
Even-indexed antidiagonals give the initial terms of A010684.

Examples

			The corner of the square array begins:
0, 2, 0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, 3, 1, ...
0, 2, 0, 2, 0, 2, ...
1, 3, 1, 3, 1, ...
0, 2, 0, 2, ...
1, 3, 1, ...
0, 2, ...
1, ...
...
The sequence written as a triangle begins:
0;
1, 2;
0, 3, 0;
1, 2, 1, 2;
0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2;
0, 3, 0, 3, 0, 3, 0, 3, 0;
1, 2, 1, 2, 1, 2, 1, 2, 1, 2;
...
		

Crossrefs

Programs

  • Maple
    ListTools:-Flatten([seq([[0,3]$i,0,[1,2]$(i+1)],i=0..10)]); # Robert Israel, Nov 14 2016
  • Mathematica
    Table[Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)

Formula

a(n) = A274913(n) - 1.
From Robert Israel, Nov 14 2016: (Start)
G.f.: 3*x/(1-x^2) - Sum_{k>=0} (2*x^(2*k^2+3*k+1)-x^(2*k^2+5*k+3))/(1+x).
G.f. as triangle: x*(1+2*y+3*x*y)/((1-x^2*y^2)*(1-x^2)). (End)

A274913 Square array read by antidiagonals upwards in which each new term is the least positive integer distinct from its neighbors.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 2, 3, 2, 3, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 4, 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3
Offset: 1

Views

Author

Omar E. Pol, Jul 11 2016

Keywords

Comments

This is also a triangle read by rows in which each new term is the least positive integer distinct from its neighbors.
In the square array we have that:
Antidiagonal sums give the positive terms of A008851.
Odd-indexed rows give A010684.
Even-indexed rows give A010694.
Odd-indexed columns give A000034.
Even-indexed columns give A010702.
Odd-indexed antidiagonals give the initial terms of A010685.
Even-indexed antidiagonals give the initial terms of A010693.
Main diagonal gives A010685.
This is also a triangle read by rows in which each new term is the least positive integer distinct from its neighbors.
In the triangle we have that:
Row sums give the positive terms of A008851.
Odd-indexed columns give A000034.
Even-indexed columns give A010702.
Odd-indexed diagonals give A010684.
Even-indexed diagonals give A010694.
Odd-indexed rows give the initial terms of A010685.
Even-indexed rows give the initial terms of A010693.
Odd-indexed antidiagonals give the initial terms of A010684.
Even-indexed antidiagonals give the initial terms of A010694.

Examples

			The corner of the square array begins:
1, 3, 1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, 4, 2, ...
1, 3, 1, 3, 1, 3, ...
2, 4, 2, 4, 2, ...
1, 3, 1, 3, ...
2, 4, 2, ...
1, 3, ...
2, ...
...
The sequence written as a triangle begins:
1;
2, 3;
1, 4, 1;
2, 3, 2, 3;
1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3;
1, 4, 1, 4, 1, 4, 1, 4, 1;
2, 3, 2, 3, 2, 3, 2, 3, 2, 3;
...
		

Crossrefs

Programs

  • Mathematica
    Table[1 + Boole@ EvenQ@ # + 2 Boole@ EvenQ@ k &[n - k + 1], {n, 14}, {k, n}] // Flatten (* Michael De Vlieger, Nov 14 2016 *)

Formula

a(n) = A274912(n) + 1.

A256680 Minimal most likely sum for a roll of n 4-sided dice.

Original entry on oeis.org

0, 1, 5, 7, 10, 12, 15, 17, 20, 22, 25, 27, 30, 32, 35, 37, 40, 42, 45, 47, 50, 52, 55, 57, 60, 62, 65, 67, 70, 72, 75, 77, 80, 82, 85, 87, 90, 92, 95, 97, 100, 102, 105, 107, 110, 112, 115, 117, 120, 122, 125, 127, 130, 132, 135, 137, 140, 142, 145, 147, 150, 152, 155, 157, 160, 162
Offset: 0

Views

Author

Ran Pan, Apr 08 2015

Keywords

Comments

In fact ceiling(5n/2) and floor(5n/2) have the same probability.
a(n) equals A047215(n) except for n=1.

Examples

			For n=1, there are four equally likely outcomes, 1,2,3,4, and the smallest of these is 1, so a(1)=1.
		

Crossrefs

Programs

  • Magma
    [n le 1 select n else Floor(5*n/2): n in [0..70]]; // Vincenzo Librandi, Apr 08 2015
    
  • Maple
    a:= n-> iquo(5*n, 2) -`if`(n=1, 1, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 08 2015
  • Mathematica
    Join[{0, 1}, Table[Floor[5 n/2], {n, 2, 100}]]
  • PARI
    a(n)=if(n<2,n,5*n\2) \\ Charles R Greathouse IV, Apr 08 2015
    
  • PARI
    concat(0, Vec(-x*(x^3-x^2-4*x-1)/((x-1)^2*(x+1)) + O(x^100))) \\ Colin Barker, Apr 08 2015

Formula

a(n) = floor(5*n/2), for n>=2; a(0)=0 and a(1)=1.
From Colin Barker, Apr 08 2015: (Start)
a(n) = (-1+(-1)^n+10*n)/4 for n>1.
a(n) = a(n-1)+a(n-2)-a(n-3) for n>4.
G.f.: -x*(x^3-x^2-4*x-1) / ((x-1)^2*(x+1)).
(End)
a(n)-a(n-1) = A010693(n-3), n>=3. - R. J. Mathar, Aug 08 2025

A368179 Square array read by ascending antidiagonals: row n is the trajectory of n under the A006368 map.

Original entry on oeis.org

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

Views

Author

Paolo Xausa, Dec 15 2023

Keywords

Examples

			Array begins:
  [ 0]   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ... = A000004
  [ 1]   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1, ... = A000012
  [ 2]   2,  3,  2,  3,  2,  3,  2,  3,  2,  3,  2, ... = A010693
  [ 3]   3,  2,  3,  2,  3,  2,  3,  2,  3,  2,  3, ... = A176059
  [ 4]   4,  6,  9,  7,  5,  4,  6,  9,  7,  5,  4, ... = A180853
  [ 5]   5,  4,  6,  9,  7,  5,  4,  6,  9,  7,  5, ... = A180853 (shifted)
  [ 6]   6,  9,  7,  5,  4,  6,  9,  7,  5,  4,  6, ... = A180853 (shifted)
  [ 7]   7,  5,  4,  6,  9,  7,  5,  4,  6,  9,  7, ... = A180853 (shifted)
  [ 8]   8, 12, 18, 27, 20, 30, 45, 34, 51, 38, 57, ... = A028393
  [ 9]   9,  7,  5,  4,  6,  9,  7,  5,  4,  6,  9, ... = A180853 (shifted)
  [10]  10, 15, 11,  8, 12, 18, 27, 20, 30, 45, 34, ... = A180864 (shifted)
  ...    |   |   |
      A001477|A168221
             |
          A006368
		

Crossrefs

Programs

  • Mathematica
    A006368[n_]:=If[OddQ[n],Floor[(3n+2)/4],3n/2];
    A368179list[dmax_]:=With[{a=Reverse[Table[NestList[A006368,n-1,dmax-n],{n,dmax}]]},Array[Diagonal[a,#]&,dmax,1-dmax]];
    A368179list[15] (* Generates 15 antidiagonals *)
Previous Showing 11-20 of 27 results. Next