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-40 of 70 results. Next

A153284 a(n) = n + Sum_{j=1..n-1} (-1)^j * a(j) for n >= 2, a(1) = 1.

Original entry on oeis.org

1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1
Offset: 1

Views

Author

Walter Carlini, Dec 23 2008

Keywords

Comments

Row sums of triangle A153860. - Gary W. Adamson, Jan 03 2009
1 followed by interleaving of A000012 and A010701. - Klaus Brockhaus, Jan 04 2009

Examples

			a(1)=1, a(2)=2-a(1)=2-1=1, a(3)=3+a(2)-a(1)=3+1-1=3, a(4)=4-a(3)+a(2)-a(1)=4-3+1-1=1, a(5)=5+1-3+1-1=3, a(6)=6-3+1-3+1-1=1, a(7)=7+1-3+1-3+1-1, etc.
		

Crossrefs

Equals A010684 with the addition of the leading term of 1
The first sequence of a family that includes A153285 and A153286
Cf. A153860.
Cf. A000012 (all 1's sequence), A010701 (all 3's sequence). - Klaus Brockhaus, Jan 04 2009

Programs

  • Magma
    S:=[ 1 ]; for n in [2..105] do Append(~S, n + &+[ (-1)^j*S[j]: j in [1..n-1] ]); end for; S; // Klaus Brockhaus, Jan 04 2009

Formula

a(n)=1 if n is 1 or even; a(n)=3 if n is odd other than 1.
G.f.: x*(1 + x + 2*x^2)/((1+x)*(1-x)). - Klaus Brockhaus, Jan 04 2009 and Oct 15 2009

A350814 Numbers m such that the largest digit in the decimal expansion of 1/m is 3.

Original entry on oeis.org

3, 30, 33, 75, 300, 303, 330, 333, 429, 750, 813, 3000, 3003, 3030, 3125, 3300, 3330, 3333, 4290, 4329, 7500, 7575, 8130, 30000, 30003, 30030, 30300, 30303, 31250, 33000, 33300, 33330, 33333, 42900, 43290, 46875, 75000, 75075, 75750, 76923, 81103, 81300, 300000
Offset: 1

Views

Author

Bernard Schott, Jan 30 2022

Keywords

Comments

If m is a term, 10*m is also a term.
3 is the only prime up to 2.6*10^8 (see comments in A333237).
Some subsequences:
{3, 30, 300, ...} = A093138 \ {1}.
{3, 33, 333, ...} = A002277 \ {0}.
{3, 33, 303, 3003, ...} = 3 * A000533.
{3, 303, 30303, 3030303, ...} = 3 * A094028.

Examples

			As 1/33 = 0.0303030303..., 33 is a term.
As 1/75 = 0.0133333333..., 75 is a term.
As 1/429 = 0.002331002331002331..., 429 is a term.
		

Crossrefs

Similar with largest digit k: A333402 (k=1), A341383 (k=2), A333237 (k=9).
Subsequences: A002277 \ {0}, A093138 \ {1}.
Decimal expansion: A010701 (1/3), A010674 (1/33).

Programs

  • Mathematica
    Select[Range[10^5], Max[RealDigits[1/#][[1]]] == 3 &] (* Amiram Eldar, Jan 30 2022 *)
  • Python
    from fractions import Fraction
    from itertools import count, islice
    from sympy import n_order, multiplicity
    def repeating_decimals_expr(f, digits_only=False):
        """ returns repeating decimals of Fraction f as the string aaa.bbb[ccc].
            returns only digits if digits_only=True.
        """
        a, b = f.as_integer_ratio()
        m2, m5 = multiplicity(2,b), multiplicity(5,b)
        r = max(m2,m5)
        k, m = 10**r, 10**n_order(10,b//2**m2//5**m5)-1
        c = k*a//b
        s = str(c).zfill(r)
        if digits_only:
            return s+str(m*k*a//b-c*m)
        else:
            w = len(s)-r
            return s[:w]+'.'+s[w:]+'['+str(m*k*a//b-c*m)+']'
    def A350814_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda m:max(repeating_decimals_expr(Fraction(1,m),digits_only=True)) == '3',count(max(startvalue,1)))
    A350814_list = list(islice(A350814_gen(),10)) # Chai Wah Wu, Feb 07 2022

Extensions

More terms from Amiram Eldar, Jan 30 2022

A134771 A134770 interleaved with threes.

Original entry on oeis.org

1, 3, 5, 3, 21, 3, 77, 3, 277, 3, 1005, 3, 3693, 3, 13725, 3, 51477, 3, 194477, 3, 739021, 3, 2821725, 3, 10816621, 3, 41602397, 3, 160466397, 3, 620470077, 3, 2404321557, 3, 9334424877, 3, 36300541197, 3, 141381055197, 3, 551386115277, 3, 2153031497757, 3
Offset: 0

Views

Author

Gary W. Adamson, Nov 10 2007

Keywords

Comments

Previous name was: A007318^(-2) * A134770.
Second inverse binomial transform of A134770.
A134770 interleaved with threes.

Examples

			First few terms of the sequence are (1, 3, 5, 3, 21, 3, 77, ...), since A134770 = (1, 3, 5, 21, 77, ...).
		

Crossrefs

Programs

  • Magma
    A134771:= func< n | (n mod 2) eq 1 select 3 else 2*(n+2)*Catalan(Floor(n/2))-3 >;
    [A134771(n): n in [0..50]]; // G. C. Greubel, Oct 13 2023
    
  • Mathematica
    Table[If[OddQ[n], 3, 4*Binomial[n,n/2] -3], {n,0,50}] (* G. C. Greubel, Oct 13 2023 *)
  • SageMath
    def A134771(n): return 4*((n+1)%2)*binomial(n, n//2) - 3*(-1)^n
    [A134771(n) for n in range(41)] # G. C. Greubel, Oct 13 2023

Formula

From G. C. Greubel, Oct 13 2023: (Start)
a(n) = 2*(1 + (-1)^n)*binomial(n, n/2) - 3*(-1)^n.
G.f.: 2/sqrt(1-4*x^2) - 3/(1+x).
E.g.f.: 4*BesselI(0, 2*x) - 3*exp(-x). (End)

Extensions

Name changed by G. C. Greubel, Oct 13 2023

A176040 Periodic sequence: Repeat 3, 1.

Original entry on oeis.org

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

Views

Author

Klaus Brockhaus, Apr 07 2010

Keywords

Comments

Interleaving of A010701 and A000012.
Also continued fraction expansion of (3+sqrt(21))/2.
Also decimal expansion of 31/99.
Essentially first differences of A014601.
Inverse binomial transform of 3 followed by A020707.
Second inverse binomial transform of A052919 without initial term 2.
Third inverse binomial transform of A007582 without initial term 1.
Exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + ... is the o.g.f. for A008619. - Peter Bala, Mar 13 2015

Crossrefs

Cf. A153284, A010701 (all 3's sequence), A000012 (all 1's sequence), A090458 (decimal expansion of (3+sqrt(21))/2), A010684 (repeat 1, 3), A014601 (congruent to 0 or 3 mod 4), A020707 (2^(n+2)), A052919, A007582 (2^(n-1)*(1+2^n)), A008619.

Programs

  • Magma
    &cat[ [3, 1]: n in [0..52] ];
    [ 2+(-1)^n: n in [0..104] ];
  • Mathematica
    PadRight[{},120,{3,1}] (* or *) LinearRecurrence[{0,1},{3,1},120] (* Harvey P. Dale, Mar 11 2015 *)

Formula

a(n) = 2+(-1)^n.
a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = 1.
a(n) = -a(n-1)+4 for n > 0; a(0) = 3.
a(n) = 3*((n+1) mod 2)+(n mod 2).
a(n) = A010684(n+1).
G.f.: (3+x)/((1-x)*(1+x)).
From Amiram Eldar, Jan 01 2023: (Start)
Multiplicative with a(2^e) = 3, and a(p^e) = 1 for p >= 3.
Dirichlet g.f.: zeta(s)*(1+2^(1-s)). (End)

A340666 A(n,k) is derived from n by replacing each 0 in its binary representation with a string of k 0's; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 1, 2, 3, 0, 1, 4, 3, 1, 0, 1, 8, 3, 4, 3, 0, 1, 16, 3, 16, 5, 3, 0, 1, 32, 3, 64, 9, 6, 7, 0, 1, 64, 3, 256, 17, 12, 7, 1, 0, 1, 128, 3, 1024, 33, 24, 7, 8, 3, 0, 1, 256, 3, 4096, 65, 48, 7, 64, 9, 3, 0, 1, 512, 3, 16384, 129, 96, 7, 512, 33, 10, 7
Offset: 0

Views

Author

Alois P. Heinz, Jan 15 2021

Keywords

Examples

			Square array A(n,k) begins:
  0, 0,  0,   0,    0,     0,      0,       0,        0, ...
  1, 1,  1,   1,    1,     1,      1,       1,        1, ...
  1, 2,  4,   8,   16,    32,     64,     128,      256, ...
  3, 3,  3,   3,    3,     3,      3,       3,        3, ...
  1, 4, 16,  64,  256,  1024,   4096,   16384,    65536, ...
  3, 5,  9,  17,   33,    65,    129,     257,      513, ...
  3, 6, 12,  24,   48,    96,    192,     384,      768, ...
  7, 7,  7,   7,    7,     7,      7,       7,        7, ...
  1, 8, 64, 512, 4096, 32768, 262144, 2097152, 16777216, ...
  ...
		

Crossrefs

Columns k=0-2, 4 give: A038573, A001477, A084471, A084473.
Rows n=0..17, 19 give: A000004, A000012, A000079, A010701, A000302, A000051(k+1), A007283, A010727, A001018, A087289, A007582(k+1), A062709(k+2), A164346, A181565(k+1), A005009, A181404(k+3), A001025, A199493, A253208(k+1).
Main diagonal gives A340667.

Programs

  • Maple
    A:= (n, k)-> Bits[Join](subs(0=[0$k][], Bits[Split](n))):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n<2, n,
         `if`(irem(n, 2, 'r')=1, A(r, k)*2+1, A(r, k)*2^k))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    A[n_, k_] := FromDigits[IntegerDigits[n, 2] /. 0 -> Sequence @@ Table[0, {k}], 2];
    Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Feb 02 2021 *)

Formula

A000120(A(n,k)) = A000120(n) = log_2(A(n,0)+1).
A023416(A(n,k)) = k * A023416(n) for n >= 1.

A013656 a(n) = n*(9*n-2).

Original entry on oeis.org

0, 7, 32, 75, 136, 215, 312, 427, 560, 711, 880, 1067, 1272, 1495, 1736, 1995, 2272, 2567, 2880, 3211, 3560, 3927, 4312, 4715, 5136, 5575, 6032, 6507, 7000, 7511, 8040, 8587, 9152, 9735, 10336, 10955, 11592, 12247, 12920, 13611, 14320, 15047, 15792, 16555
Offset: 0

Views

Author

Keywords

Comments

For n>0, numbers such that sqrt(a(n)) has the continued fraction {k;[1,1,1,2k]}, where the part in [] is repeated and k is of the form 3m+2 (A016789). - Bruno Berselli, May 30 2013
For n >= 1, the continued fraction expansion of sqrt(4*a(n)) is [6n-1; {3, 3n-1, 3, 12n-2}]. - Magus K. Chu, Sep 18 2022

Crossrefs

Programs

Formula

a(n+1) = A144454(9*n+7) = A061039(27*n+21). - Paul Curtz, Nov 05 2008
a(n) = a(n-1) + 18*n - 11 with n>0, a(0)=0. - Vincenzo Librandi, Nov 22 2010
a(0)=0, a(1)=7, a(2)=32, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jul 07 2012
From G. C. Greubel, Mar 11 2022: (Start)
G.f.: x*(7 - 11*x)/(1-x)^3.
E.g.f.: x*(7 + 9*x)*exp(x). (End)
Sum_{n>=1} 1/a(n) = -(psi(7/9)+gamma)/2 = (A354640-A001620)/2 = 0.22000753... - R. J. Mathar, Apr 22 2024

A147296 a(n) = n*(9*n+2).

Original entry on oeis.org

0, 11, 40, 87, 152, 235, 336, 455, 592, 747, 920, 1111, 1320, 1547, 1792, 2055, 2336, 2635, 2952, 3287, 3640, 4011, 4400, 4807, 5232, 5675, 6136, 6615, 7112, 7627, 8160, 8711, 9280, 9867, 10472, 11095, 11736, 12395, 13072, 13767, 14480, 15211, 15960
Offset: 0

Views

Author

Paul Curtz, Nov 05 2008

Keywords

Comments

For n >= 1, the continued fraction expansion of sqrt(4*a(n)) is [6n; {1, 1, 1, 3n-1, 1, 1, 1, 12n}]. - Magus K. Chu, Sep 17 2022

Crossrefs

Equals first 9-fold decimation of A144454.

Programs

  • Mathematica
    Table[n(9n+2),{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{0,11,40},50] (* Harvey P. Dale, Dec 19 2014 *)
  • PARI
    A147296(n) = n*(9*n + 2) \\ M. F. Hasler, Mar 01 2009

Formula

a(n) = n*(9*n + 2), as conjectured by V. Librandi. - M. F. Hasler, Mar 01 2009
G.f.: x*(11+7*x)/(1-x)^3. - Jaume Oliver Lafont, Aug 30 2009
a(n) = floor((3*n + 1/3)^2). - Reinhard Zumkeller, Apr 14 2010
From Elmo R. Oliveira, Dec 15 2024: (Start)
E.g.f.: exp(x)*x*(11 + 9*x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 3. (End)

Extensions

More terms from M. F. Hasler, Mar 01 2009

A021025 Decimal expansion of 1/21.

Original entry on oeis.org

0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7, 6, 1, 9, 0, 4, 7
Offset: 0

Views

Author

Keywords

Examples

			0.047619047...
		

Crossrefs

Cf. A010701 (1/3), A020806 (1/7).

Programs

A021733 Decimal expansion of 1/729.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

729 = 3^6 = 9^3 = 27^2.
Period is 81 = 9^2 (see example for all 81 digits of the repeating part).
Repeating part in the form of 9 X 9 square table:
1, 3, 7, 1, 7, 4, 2, 1, 1,
2, 4, 8, 2, 8, 5, 3, 2, 2,
3, 5, 9, 3, 9, 6, 4, 3, 3,
4, 7, 0, 5, 0, 7, 5, 4, 4,
5, 8, 1, 6, 1, 8, 6, 5, 5,
6, 9, 2, 7, 2, 9, 7, 6, 6,
8, 0, 3, 8, 4, 0, 8, 7, 7,
9, 1, 4, 9, 5, 1, 9, 8, 9,
0, 2, 6, 0, 6, 3, 1, 0, 0.
Note that each column consists of 9 consecutive (cyclically repeated) digits out of 10. The missing digits in columns from left to right are {7, 6, 5, 4, 3, 2, 0, 9, 8}, which form also a cycle of 9 out of 10 consecutive digits in reverse order, all digits except 1. - Alexander Adamchuk, Dec 28 2013

Examples

			1/729 = 0.00137174211248285322359396433470507544581618655692729766\
803840877914951989026063100 (period 81). - _Alexander Adamchuk_, Dec 28 2013
		

Crossrefs

Cf. A068542 (period of the fraction 1/3^n).
Cf. A010701 (1/3), A000012 (1/9), A021031 (1/27), A021085 (1/81).

Programs

Formula

Equals Sum_{k>=1} (k*(k+1)/2)/10^(k+2). - Davide Rotondo, Jun 11 2025

A194880 The numerators of the inverse Akiyama-Tanigawa algorithm from A001045(n).

Original entry on oeis.org

0, -1, -1, -4, -5, -2, -7, -8, -3, -10, -11, -4, -13, -14, -5, -16, -17, -6, -19, -20, -7, -22, -23, -8, -25, -26, -9, -28, -29, -10, -31, -32, -11, -34, -35, -12, -37, -38, -13, -40, -41, -14, -43, -44, -15, -46, -47, -16, -49, -50, -17, -52, -53, -18, -55, -56, -19, -58, -59, -20
Offset: 0

Views

Author

Paul Curtz, Sep 07 2011

Keywords

Comments

0, -1, -1, -4/3, -5/3, -2, -7/3, -8/3, -3, -10/3, -11/3, -4, -13/4, -14/3, -5, = a(n)/b(n),
1, 0, 1, 4/3, 5/3, 2, 7/3, 8/3, 3,
1, -2, -1, -4/3, -5/3, -2, -7/3, -8/3, -3,
3, -2, 1, 4/3, 5/3, 2, 7/3, 8/3, 3,
5, -6, -1, -4/3, -5/3, -2, -7/3, -8/3, -3,
11, -10, 1, 4/3, 5/3, 2, 7/3, 8/3, 3,
21, -22, -1, -4/3, -5/3, -2, -7/3, -8/3, -3,
Vertical: A001045(n), -A078008(n), (-1)^(n+1)*A000012(n), (-1)^(n+1)*A010709(n)/A010701(n), (-1)^(n+1)*A010716(n+1)/A010701(n), A007395(n), .. .
a(n)=0, 1 before (-A145064(n+1)=-A051176(n+3).
b(n)=1, 1 before A169609(n). b(n)=1, 1, 1 before A144437(n+1).
a(n+5)-a(n+2)=b(n+5) (=-1,-3,-3,=-A169609(n)).

Programs

  • Mathematica
    a[0]=0; a[1]=-1; a[n_] := (-n-1)/Max[1, 2*Mod[n, 3]-1]; Table[a[n], {n, 0, 59}] (* Jean-François Alcover, Sep 18 2012 *)

Formula

a(3*n)=-3*n-1 except a(0)=0; a(3*n+1)=-3*n-2 except a(1)=-1; a(3*n+2)=-n-1.
From Chai Wah Wu, May 07 2024: (Start)
a(n) = 2*a(n-3) - a(n-6) for n > 7.
G.f.: x*(x^6 + x^5 - 3*x^3 - 4*x^2 - x - 1)/(x^6 - 2*x^3 + 1). (End)
Previous Showing 31-40 of 70 results. Next