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 41-50 of 56 results. Next

A330569 a(n) = 1 if n is odd, otherwise a(n) = 2^(v-1)+1 where v is the 2-adic valuation of n (A007814(n)).

Original entry on oeis.org

1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 17, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 33, 1, 2, 1, 3, 1, 2, 1, 5, 1, 2, 1, 3, 1, 2, 1, 9, 1, 2, 1, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Jan 07 2020

Keywords

Comments

Conjecture: a(n) is the height of the bottom region in column n of the Conant gasket in A328078.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[OddQ[n], 1, 1 + 2^(IntegerExponent[n, 2] - 1)]; Array[a, 100] (* Amiram Eldar, Aug 30 2024 *)
  • PARI
    a(n) = if(n % 2, 1, 1 + 1 << (valuation(n, 2) - 1)); \\ Amiram Eldar, Aug 30 2024
  • Python
    def A330569(n): return 1+(0 if n&1 else 1<<(~n & n-1).bit_length()-1) # Chai Wah Wu, Jul 01 2022
    

Formula

a(n) = (A006519(n) + A040001(n))/2. - Ridouane Oudra, Jul 30 2025

A109054 Squares and numbers k such that the continued fraction expansion of sqrt(k) is multiplicative.

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 9, 13, 14, 15, 16, 22, 23, 24, 25, 32, 33, 34, 35, 36, 44, 47, 48, 49, 58, 59, 60, 62, 63, 64, 74, 75, 78, 79, 80, 81, 95, 96, 98, 99, 100, 114, 119, 120, 121, 135, 136, 138, 140, 141, 142, 143, 144, 160, 162, 164, 167, 168, 169, 185, 187, 189, 192
Offset: 1

Views

Author

Mitch Harris, Jun 18 2005

Keywords

Comments

If we consider each square k as having a continued fraction expansion c of all zeros after c(0) = sqrt(k)-1, then the continued fraction expansion of sqrt(k) for each square is trivially multiplicative.
For nonsquares, c(1) must be 1 and so k must satisfy m + 1/2 < sqrt(k) <= m+1, for some integer m.

Examples

			The continued fraction of sqrt(22) is c = (4; 1, 2, 4, 2, 1, 8, ...) = A010126, which is multiplicative with c(2^e) = 2, c(3^e) = 4, c(p^e) = 1 otherwise.
		

Crossrefs

Union of A000290 and A108575.
Continued fraction expansions: A040001, A010121, A040005, etc.

A113497 Ascending descending base exponent transform of sequence A000034(n) = 1 + n mod 2.

Original entry on oeis.org

1, 3, 6, 6, 11, 9, 16, 12, 21, 15, 26, 18, 31, 21, 36, 24, 41, 27, 46, 30, 51, 33, 56, 36, 61, 39, 66, 42, 71, 45, 76, 48, 81, 51, 86, 54, 91, 57, 96, 60, 101, 63, 106, 66, 111, 69, 116, 72, 121, 75, 126, 78, 131, 81, 136, 84, 141, 87, 146, 90, 151, 93, 156, 96, 161, 99, 166, 102, 171
Offset: 1

Views

Author

Jonathan Vos Post, Jan 10 2006

Keywords

Comments

A000034 = 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, ... = continued fraction for (sqrt(3)+1)/2 (cf. A040001) = base 3 digital root of n+1. In general, the ascending descending base exponent transform of any simple periodic sequence can be written as a periodic set of interleaved sequences.

Examples

			a(1) = 1^1 = 1.
a(2) = 1^2 + 2^1 = 3.
a(3) = 1^1 + 2^2 + 1^1 = 6.
a(4) = 1^2 + 2^1 + 1^2 + 2^1 = 6.
a(5) = 1^1 + 2^2 + 1^1 + 2^2 + 1^1 = 11.
a(6) = 1^2 + 2^1 + 1^2 + 2^1 + 1^2 + 2^1 = 9.
		

Crossrefs

Programs

  • Mathematica
    Table[(-3 + 3*(-1)^n + 8*n - 2*(-1)^n*n)/4, {n,1,50}] (* G. C. Greubel, Mar 12 2017 *)
  • PARI
    x='x +O('x^50); Vec(x*(1+3*x+4*x^2)/((1-x)^2*(1+x)^2)) \\ G. C. Greubel, Mar 12 2017

Formula

a(n) = Sum_{i=1..n} A000034(i)^A000034(n-i+1).
a(2*n) = 3*n; a(2*n+1) = 5*n+1.
From Colin Barker, Jun 16 2012: (Start)
a(n) = (-3+3*(-1)^n+8*n-2*(-1)^n*n)/4.
a(n) = 2*a(n-2)-a(n-4).
G.f.: x*(1+3*x+4*x^2)/((1-x)^2*(1+x)^2). (End)
E.g.f.: (1/2)*(3*(x-1)*sinh(x) + 5*x*cosh(x)). - G. C. Greubel, Mar 12 2017

Extensions

Definition improved by M. F. Hasler, Jan 13 2012

A129204 The denominator of 2/n^3.

Original entry on oeis.org

1, 1, 4, 27, 32, 125, 108, 343, 256, 729, 500, 1331, 864, 2197, 1372, 3375, 2048, 4913, 2916, 6859, 4000, 9261, 5324, 12167, 6912, 15625, 8788, 19683, 10976, 24389, 13500, 29791, 16384, 35937, 19652, 42875, 23328, 50653, 27436, 59319, 32000
Offset: 0

Views

Author

Paul Barry, Apr 03 2007

Keywords

Comments

Take two consecutive triangular numbers t1 and t2 and create a triangle using (0,0), (t1,t2) and (t2,t1). The area of this triangle will be ((n+1)^3)/2 for t1 = n*(n+1)/2. - J. M. Bergot, May 08 2012
Multiplicative because both A000578 and A040001 are. - Andrew Howroyd, Jul 26 2018

Crossrefs

Programs

  • Magma
    [1] cat [Denominator(2/n^3): n in [1..40]]; // Vincenzo Librandi, Jul 26 2018
  • Mathematica
    Join[{1}, Table[Denominator[2 / n^3], {n, 100}]] (* Vincenzo Librandi, Jul 26 2018 *)
  • PARI
    a(n) = if(n < 1, n==0, lcm(2, n^3)/2) \\ Andrew Howroyd, Jul 25 2018
    

Formula

G.f.: (1+x+23x^2+22x^4+23x^5+x^7+x^8)/(1-x^2)^4.
a(n) = 0^n + n^3*(3/4 - (-1)^n/4).
a(n+1) = A129196(n)*(5/3 + (4/3)*cos(2*Pi*(n+1)/3)).
a(2n) = 4n^3, a(2n+1) = (2n+1)^3.
a(n) = A000578(n) / A040001(n). - Andrew Howroyd, Jul 25 2018
From Amiram Eldar, Aug 25 2022: (Start)
Sum_{n>=0} 1/a(n) = 1 + 9*zeta(3)/8.
Sum_{n>=0} (-1)^n/a(n) = 1 - 5*zeta(3)/8. (End)
From Peter Bala, Jan 21 2024: (Start)
For n >= 1, a(n) = n*A129194(n) = n*Sum_{d divides n} (-1)^(d+1)*J(2,n/d), where the Jordan totient function J_2(n) = A007434(n). Cf. A309337.
Dirichlet g.f. for sequence without the a(0) term: (1 - 4/2^s)*zeta(s-3). (End)

Extensions

More terms from Vincenzo Librandi, Jul 26 2018

A175678 Numbers m such that the arithmetic mean Ad(m) of the divisors of m and the arithmetic mean Ah(m) of the numbers h < m such that gcd(h,m) = 1 are both integer.

Original entry on oeis.org

1, 6, 14, 20, 22, 30, 38, 42, 44, 46, 54, 56, 60, 62, 66, 68, 70, 78, 86, 92, 94, 96, 102, 110, 114, 116, 118, 126, 132, 134, 138, 140, 142, 150, 154, 158, 164, 166, 168, 174, 182, 184, 186, 188, 190, 198, 204, 206, 210, 212, 214, 220, 222, 224, 230, 236, 238, 246, 248, 254, 258
Offset: 1

Views

Author

Jaroslav Krizek, Aug 07 2010

Keywords

Comments

Numbers m such that Ad(m) = A000203(m)/A000005(m) = A057020(m)/A057021(m) and Ah(m) = A023896(m)/A000010(m) = A026741(m)/A040001(m-1) are both integers.
{a(n)} = 1 and the even arithmetic numbers from A003601.
Subsequence of A003601.
Union of {a(n)} and A175679 = A003601 (arithmetic numbers).

Examples

			a(2) = 6, Ad(6) = (1+2+3+6)/4 = 3, Ah(6) = (1+5)/2 = 3, Ad(6) and Ah(6) are both integer.
		

Crossrefs

Programs

  • PARI
    Ad(n) = sigma(n)/numdiv(n);
    Ah(n) = if(n<2, n>0, n*eulerphi(n)/2)/eulerphi(n);
    isok(k) = (type(Ad(k)) == "t_INT") && (type(Ah(k)) == "t_INT"); \\ Michel Marcus, Oct 09 2023

Extensions

More terms from Michel Marcus, Oct 09 2023

A175679 Numbers m such that arithmetic mean Ad(m) of divisors of m and arithmetic mean Ak(m) of numbers 1 <= k <= m are both integer.

Original entry on oeis.org

1, 3, 5, 7, 11, 13, 15, 17, 19, 21, 23, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 77, 79, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 119, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141
Offset: 1

Views

Author

Jaroslav Krizek, Aug 07 2010

Keywords

Comments

Numbers m such that Ad(m) = A000203(m) / A000005(m) = A057020(m) / A057021(m) and Ak(m) = A000217(m) / A000027(m) = A145051(m) / A040001(m) are both integer.
Subsequence of A003601: {a(n)} = odd arithmetic numbers from A003601.
{a(n)} union A175678 = A003601 (arithmetic numbers).
From Robert G. Wilson v, Aug 09 2010: (Start)
All terms are odd because the second criterion is equivalent to n|T(n), where T(n) is the n-th triangular number, A000217(n).
Terms that are not prime are 1, 15, 21, 27, 33, 35, 39, 45, 49, 51, 55, 57, 65, 69, 77, 85, ..., .
Odd integers that are not terms: 9, 25, 63, 75, 81, 117, 121, 171, 175, 225, 243, 279, 289, ..., . (End)

Examples

			a(4) = 7, Ad(7) = (1+7)/2 = 4, Ak(7) = (1+2+3+4+5+6+7)/7 = 4, Ad(7) and Ak(7) are both integer.
		

Programs

  • Mathematica
    fQ[n_] := OddQ@n && Mod[DivisorSigma[1, n], DivisorSigma[0, n]] == 0; Select[ Range@ 142, fQ] (* Robert G. Wilson v, Aug 09 2010 *)

Extensions

More terms from Robert G. Wilson v, Aug 09 2010

A175922 Period 5: repeat [1, 1, 2, -1, 2].

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Oct 17 2010

Keywords

Crossrefs

Programs

Formula

a(n) = 1 + (2/5)*(cos(2*n*Pi/5) + cos(4*n*Pi/5) - 2*cos(2*(n+1)*Pi/5) - sin((4*n+3)*Pi/10) + 2*sin((8*n+3)*Pi/10) + sin((8*n+1)*Pi/10)). - Wesley Ivan Hurt, Sep 27 2018
G.f.: x*(1 + x + 2*x^2 - x^3 + 2*x^4) / (1 - x^5). - Vincenzo Librandi, Sep 28 2018
a(n) = a(n-5). - Wesley Ivan Hurt, Jun 25 2022

Extensions

Edited by Joerg Arndt, Sep 16 2013

A176447 a(2n) = -n, a(2n+1) = 2n+1.

Original entry on oeis.org

0, 1, -1, 3, -2, 5, -3, 7, -4, 9, -5, 11, -6, 13, -7, 15, -8, 17, -9, 19, -10, 21, -11, 23, -12, 25, -13, 27, -14, 29, -15, 31, -16, 33, -17, 35, -18, 37, -19, 39, -20, 41, -21, 43, -22, 45, -23, 47, -24, 49, -25, 51, -26, 53, -27, 55, -28, 57, -29, 59, -30, 61, -31, 63, -32, 65, -33, 67, -34, 69, -35
Offset: 0

Views

Author

Paul Curtz, Apr 18 2010

Keywords

Comments

There is more complicated way of defining the sequence: consider the sequence of modified Bernoulli numbers EVB(n) = A176327(n)/A176289(n) and its inverse binomial transform IEVB(n) = A176328(n)/A176591(n). Then a(n) is the numerator of the difference EVB(n)-IEVB(n). The denominator of the difference is 1 if n=0, else A040001(n-1).
A particularity of EVB(n) is: its (forward) binomial transform is 1, 1, 7/6, 3/2, 59/30,.. = (-1)^n*IEVB(n).
Note that A026741 is related to the Rydberg-Ritz spectrum of the hydrogen atom.

Examples

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

Crossrefs

Programs

  • Magma
    [n*(1-3*(-1)^n)/4: n in [0..60]]; // Vincenzo Librandi, Aug 04 2011
    
  • Mathematica
    a[n_?EvenQ]:=-(n/2); a[n_?OddQ]:=n; Table[a[n], {n, 100}] (* Alonso del Arte, Dec 01 2010 *)
    a[ n_] := n / If[ Mod[ n, 2] == 1, 1, -2]; (* Michael Somos, Jun 11 2013 *)
    CoefficientList[Series[x (1 - x + x^2)/((x - 1)^2*(1 + x)^2), {x, 0, 70}], x]  (* Michael De Vlieger, Dec 10 2016 *)
    LinearRecurrence[{0,2,0,-1},{0,1,-1,3},80] (* Harvey P. Dale, Nov 01 2017 *)
  • PARI
    {a(n) = n / if( n%2, 1, -2)}; /* Michael Somos, Jun 11 2013 */

Formula

From R. J. Mathar, Dec 01 2010: (Start)
a(n) = (-1)^n*A026741(n) = n*(1-3*(-1)^n)/4.
G.f.: x*(1-x+x^2) / ( (x-1)^2*(1+x)^2 ).
a(n) = +2*a(n-2) -a(n-4). (End)
a(n) = -a(-n) for all n in Z. - Michael Somos, Jun 11 2013
From Michael Somos, Aug 30 2014: (Start)
Euler transform of length 6 sequence [ -1, 3, 1, 0, 0, -1].
0 = - 1 - a(n) - a(n+1) + a(n+2) + a(n+3) for all n in Z.
0 = 1 + a(n)*(-2 -a(n) + a(n+2)) - 2*a(n+1) - a(n+2) for all n in Z. (End)
From Michael Somos, May 04 2015: (Start)
a(n) is multiplicative with a(2^e) = -(2^(e-1)) if e>0, a(p^e) = p^e otherwise.
G.f.: (f(x) - 3 * f(-x)) / 4 where f(x) := x / (1 - x)^2.
G.f.: x * (1 - x) * (1 - x^6) / ((1 - x^2)^3 * (1 - x^3)). (End)
From Amiram Eldar, Sep 21 2023: (Start)
Dirichlet g.f.: zeta(s-1) * (1 - 3/2^s).
Sum_{k=0..n} a(k) = A008795(n-1), for n > 0.
Sum_{k=0..n} a(k) ~ n^2/8. (End)

A256595 Triangle A074909(n) with 0's as second column.

Original entry on oeis.org

1, 1, 0, 1, 0, 3, 1, 0, 6, 4, 1, 0, 10, 10, 5, 1, 0, 15, 20, 15, 6, 1, 0, 21, 35, 35, 21, 7, 1, 0, 28, 56, 70, 56, 28, 8, 1, 0, 36, 84, 126, 126, 84, 36, 9, 1, 0, 45, 120, 210, 252, 210, 120, 45, 10, 1, 0, 55, 165, 330, 462, 462, 330, 165, 55, 11
Offset: 0

Views

Author

Paul Curtz, Apr 03 2015

Keywords

Comments

For Bernoulli numbers, B(1) excluded.
B(n) is calculated via
B(0) = 1;
B(0) + 0 = 1;
B(0) + 0 + 3*B(2) = 3/2;
B(0) + 0 + 6*B(2) + 4*B(3) = 2;
etc.
The diagonal is A026741(n+1)/A040001(n).
Row sums: 1, 1, 4, 11, 26, 57, ..., essentially Euler numbers A000295. See A130103, A008292 and A173018.
There is an infinitude of Bernoulli number sequences. They are of the form
B(n,q) = 1, q, 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, 0, ... .
Chronologically, the first, and the most regular, is, for q=1/2, A164555(n)/A027642(n), from Jacob Bernoulli (1654-1705), published in Ars Conjectandi in 1713 and(?) Seko Kowa (1642-1708) in 1712. See A159688. The second is, for q=-1/2, B(n,-1/2) = A027641(n)/A027642(n), from B(n,1/2) via Pascal's triangle. We could choose Be(n,q) instead of B(n,q) to avoid confusion with Sloane's B(n,p) for A027641(n)/A027642(n) (p=-1), A164555(n)/A027642(n) (p=1), A164558(n)/A027642(n) (p=2), A157809(n)/A027642(n) (p=3), ..., successive binomial transforms of the previous sequence.
This motivates the proposal of the (independent of q) sequence Bernoulli(n+2):
B(n+2) = 1/6, 0, -1/30, 0, 1/42, 0, -1/30, 0, 5/66, ... and its inverse binomial transform. See A190339.

Examples

			1,
1, 0,
1, 0,  3,
1, 0,  6, 4,
1, 0, 10, 10,  5,
1, 0, 15, 20, 15, 6,
1, 0, 21, 35, 35, 21, 7,
etc.
		

References

  • Jacob Bernoulli, Ars Conjectandi (1713).

Crossrefs

Programs

A280193 a(2*n) = 2, a(2*n + 1) = -1, a(0) = 1.

Original entry on oeis.org

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

Views

Author

Michael Somos, Dec 28 2016

Keywords

Examples

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

Crossrefs

Programs

  • Magma
    m:=50; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1 - x+x^2)/(1-x^2))); // G. C. Greubel, Jul 29 2018
  • Mathematica
    a[ n_] := Which[ n < 1, Boole[n == 0], OddQ[n], -1, True, 2];
    a[ n_] := SeriesCoefficient[ (1 - x + x^2) / (1 - x^2), {x, 0, n}];
    LinearRecurrence[{0,1},{1,-1,2},80] (* Harvey P. Dale, Aug 06 2025 *)
  • PARI
    {a(n) = if( n<1, n==0, 2 - 3*(n%2))};
    
  • PARI
    {a(n) = if( n<1, n==0, [2, -1][n%2 + 1])};
    
  • PARI
    {a(n) = if( n<0, 0, polcoeff( (1 - x + x^2) / (1 - x^2) + x * O(x^n), n))};
    

Formula

Euler transform of length 6 sequence [-1, 2, 1, 0, 0, -1].
Moebius transform is length 2 sequence [-1, 3].
a(n) = -b(n) where b() is multiplicative with b(2^e) = -2 if e>0, b(p^e) = 1 otherwise.
G.f.: (1 - x + x^2) / (1 - x^2).
G.f.: (1 - x) * (1 - x^6) / ((1 - x^3) * (1 -x^2)^2).
G.f.: 1 / (1 + x / (1 + x / (1 - 3*x / (1 + x)))).
a(n) = (-1)^n * A040001(n).
A028242(n) = Sum_{k=0..n} a(k).
A117575(n+1) = Product_{k=0..n} a(k).
A000225(n-1) = Sum_{k=0..n} binomial(n, k) * a(k) if n>0.
A000325(n) = Sum_{k=0..n} binomial(n, k+1) * a(k) if n>0.
a(n) = Sum_{k=0..n} binomial(n, k) * (-1)^k * A083329(k).
A079583(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n.
a(n) = A168361(n+1), n>0. - R. J. Mathar, Jan 04 2017
Previous Showing 41-50 of 56 results. Next