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.

Showing 1-10 of 36 results. Next

A144472 Negative values along the main diagonal of the array defined by A020806 and its differences.

Original entry on oeis.org

-1, 2, 9, 13, 31, 57, 119, 233, 471, 937, 1879, 3753, 7511, 15017, 30039, 60073, 120151, 240297, 480599, 961193, 1922391, 3844777, 7689559, 15379113, 30758231, 61516457, 123032919, 246065833, 492131671, 984263337, 1968526679, 3937053353, 7874106711
Offset: 1

Views

Author

Paul Curtz, Oct 10 2008, Oct 14 2008

Keywords

Examples

			A020806 and its repeated differences in the next rows start as follows:
..1,..4,..2,..8,..5,..7,..1,..4,..2,..8, <- A020806
..3,.-2,..6,.-3,..2,.-6,..3,.-2,..6,.-3, <- A131969
.-5,..8,.-9,..5,.-8,..9,.-5,..8,.-9,..5,
.13,-17,.14,-13,.17,-14,.13,-17,.14,-13,
-30,.31,-27,.30,-31,.27,-30,.31,-27,.30,
.61,-58,.57,-61,.58,-57,.61,-58,.57,-61,
The diagonal is 1,-2,-9,-13,-31,... which yields a(n) after signs are flipped.
		

Programs

  • Mathematica
    Join[{-1}, LinearRecurrence[{1, 2}, {2, 9}, 40]] (* Jean-François Alcover, Nov 06 2017 *)
  • PARI
    Vec(-x*(1 - 3*x - 9*x^2) / ((1 + x)*(1 - 2*x)) + O(x^50)) \\ Colin Barker, Nov 06 2017

Formula

a(n+1) - 2*a(n) = (-1)^n*A010716(n), n>1, period 2.
G.f.: x*(1-3*x-9*x^2) / ((1+x)*(2*x-1)). - R. J. Mathar, Oct 24 2008
a(n) = 11*2^(n-2)/3 - 5*(-1)^n/3, n>1. - R. J. Mathar, Oct 24 2008
From Colin Barker, Nov 06 2017: (Start)
a(n) = (11*2^n - 20) / 12 for n>1 and even.
a(n) = (11*2^n + 20) / 12 for n>1 and odd.
a(n) = a(n-1) + 2*a(n-2) for n>3.
(End)

Extensions

Edited and extended by R. J. Mathar, Oct 24 2008

A257581 Continued square root map applied to the sequence (1,4,2,8,5,7) repeated (A020806).

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, May 02 2015

Keywords

Comments

The continued square root map applied to a sequence b(1), b(2), b(3), ... is defined to be the number sqrt(b(1)+sqrt(b(2)+sqrt(b(3)+sqrt(b(4)+...)))).

Examples

			1.8734951093713154879193475...
		

Crossrefs

Cf. A020806.

Extensions

a(27)-a(87) from Hiroaki Yamanouchi, May 03 2015

A131969 First differences of A020806.

Original entry on oeis.org

3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6, 3, -2, 6, -3, 2, -6
Offset: 0

Views

Author

Paul Curtz, Oct 06 2007

Keywords

Formula

a(n)=11*(-1)^n/3-2*A010892(n)/3+7*A010892(n-1)/3, n>0. a(n+6)=a(n). G.f.: (3-2x+6x^2)/((1+x)(1-x+x^2)). [From R. J. Mathar, Oct 24 2008]

A144471 Inverse binomial transform of A020806.

Original entry on oeis.org

1, 3, -5, 13, -30, 61, -119, 234, -467, 937, -1878, 3757, -7511, 15018, -30035, 60073, -120150, 240301, -480599, 961194, -1922387, 3844777, -7689558, 15379117, -30758231, 61516458, -123032915, 246065833, -492131670, 984263341, -1968526679, 3937053354, -7874106707
Offset: 0

Views

Author

Paul Curtz, Oct 10 2008

Keywords

Crossrefs

Programs

  • Maple
    Digits := 200 ; read("transforms") ; read("transforms3") ; x := 1/7 ; L := CONSTTOLIST(x) ; BINOMIALi(L) ; # R. J. Mathar, Sep 07 2009
  • Mathematica
    LinearRecurrence[{-3,-3,-2},{1,3,-5,13},40] (* Harvey P. Dale, Nov 11 2017 *)

Formula

|a(n+1)| - 2*|a(n)| = -A117378(n-1) = A117378(n+2), n>0.
a(n) = -3*a(n-1) - 3*a(n-2) - 2*a(n-3), n > 3.
G.f.: (6*x+7*x^2+9*x^3+1) / ((2*x+1) * (1+x+x^2)). - R. J. Mathar, Sep 07 2009

Extensions

Edited and extended by R. J. Mathar, Sep 07 2009

A153130 Period 6: repeat [1, 2, 4, 8, 7, 5].

Original entry on oeis.org

1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, 5
Offset: 0

Views

Author

Paul Curtz, Dec 19 2008

Keywords

Comments

Digital root of 2^n.
A regular version of Pitoun's sequence: a(n) = A029898(n+1).
Also obtained from permutations of A141425, A020806, A070366, A153110, A153990, A154127, A154687, or A154815.
This sequence and its (again period 6) repeated differences produce the table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, -1, -2, -4, 1, 2, 4, -1, -2, ...
1, 2, -5, -1, -2, 5, 1, 2, -5, -1, -2, ...
1, -7, 4, -1, 7, -4, 1, -7, 4, -1, 7, ...
-8, 11, -5, 8,-11, 5, -8, 11, -5, 8,-11, ...
19,-16, 13,-19, 16,-13, 19,-16, 13,-19, 16, ...
-35, 29,-32, 35,-29, 32,-35, 29,-32, 35,-29, ...
64,-61, 67,-64, 61,-67, 64,-61, 67,-64, 61, ...
If each entry of this table is read modulo 9 we obtain the very regular table:
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
1, 2, 4, 8, 7, 5, 1, 2, 4, 8, 7, ...
Also the decimal expansion of the constant 125/1001. - R. J. Mathar, Jan 23 2009
Digital root of the powers of any number congruent to 2 mod 9. - Alonso del Arte, Jan 26 2014

References

  • Cecil Balmond, Number 9: The Search for the Sigma Code. Munich, New York: Prestel (1998): 203.

Crossrefs

Cf. digital roots of powers of c mod 9: c = 4, A100402; c = 5, A070366; c = 7, A070403; c = 8, A010689.

Programs

Formula

a(n) + a(n+3) = 9 = A010734(n).
G.f.: (1+x+2x^2+5x^3)/((1-x)(1+x)(1-x+x^2)). - R. J. Mathar, Jan 23 2009
a(n) = A082365(n) mod 9. - Paul Curtz, Mar 31 2009
a(n) = -1/2*cos(Pi*n) - 3*cos(1/3*Pi*n) - 3^(1/2)*sin(1/3*Pi*n) + 9/2. - Leonid Bedratyuk, May 13 2012
a(n) = A010888(A004000(n+1)). - Ivan N. Ianakiev, Nov 27 2014
From Wesley Ivan Hurt, Apr 20 2015: (Start)
a(n) = a(n-6) for n>5.
a(n) = a(n-1) - a(n-3) + a(n-4) for n>3.
a(n) = (2+3*(n-1 mod 3))*(n mod 2) + (1+3*(-n mod 3))*(n-1 mod 2). (End)
a(n) = 2^n mod 9. - Nikita Sadkov, Oct 06 2018
From Stefano Spezia, Mar 20 2025: (Start)
E.g.f.: 4*cosh(x) - exp(x/2)*(3*cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2)) + 5*sinh(x).
a(n) = A007953(2*a(n-1)) = A010888(2*a(n-1)). (End)

Extensions

Edited by R. J. Mathar, Apr 09 2009

A057357 a(n) = floor(3*n/7).

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 18, 19, 19, 20, 20, 21, 21, 21, 22, 22, 23, 23, 24, 24, 24, 25, 25, 26, 26, 27, 27, 27, 28, 28, 29, 29, 30, 30, 30, 31, 31, 32, 32
Offset: 0

Views

Author

Keywords

Comments

The cyclic pattern (and numerator of the gf) is computed using Euclid's algorithm for GCD.
This sequence relates to 3/7 = 0.42857142... (essentially given by A020806). It differs from the Beatty sequence A308358 for sqrt(3)/4 = 0.43301270... = A120011.

References

  • N. Dershowitz and E. M. Reingold, Calendrical Calculations, Cambridge University Press, 1997.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics, Addison-Wesley, NY, 1994.

Crossrefs

Programs

Formula

G.f.: (1+x^2+x^4)*x^3/((1-x)*(1-x^7)) - Bruce Corrigan (scentman(AT)myfamily.com), Jul 03 2002
for all m>=0 a(7m)=0 mod 3; a(7m+1)=0 mod 3; a(7m+2)= 0 mod 3; a(7m+3) = 1 mod 3; a(5m+4) = 1 mod 3; a(7m+5) = 2 mod 3; a(7m+6) = 2 mod 3 - Bruce Corrigan (scentman(AT)myfamily.com), Jul 03 2002
Sum_{n>=3} (-1)^(n+1)/a(n) = log(2)/3 (A193535). - Amiram Eldar, Sep 30 2022

A068028 Decimal expansion of 22/7.

Original entry on oeis.org

3, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4, 2, 8, 5, 7, 1, 4
Offset: 1

Views

Author

Nenad Radakovic, Mar 22 2002

Keywords

Comments

This is an approximation to Pi. It is accurate to 0.04025%.
Consider the recurring part of 22/7 and the sequences R(i) = 2, 1, 4, 2, 3, 0, 2, ... and Q(i) = 1, 4, 2, 8, 5, 7, 1, .... For i > 0, let X(i) = 10*R(i) + Q(i). Then Q(i+1) = floor(X(i)/Y); R(i+1) = X(i) - Y*Q(i+1); here Y=5; X(0)=X=7. Note 1/7 = 7/49 = X/(10*Y-1). Similar comment holds elsewhere. If we consider the sequences R(i) = 3, 2, 3, 5, 5, 1, 4, 0, 6, 4, 6, 3, 4, 3, 1, 1, 5, 2, 6, 0, 2, 0, 3, ... and Q(i) = A021027, we have X=3; Y=7 (attributed to Vedic literature). - K.V.Iyer, Jun 16 2010, Jun 18 2010
The sequence of convergents of the continued fraction of Pi begins [3, 22/7, 333/106, 355/113, 103993/33102, ...]. 22/7 is the second convergent. The summation 240*Sum_{n >= 1} 1/((4*n+1)*(4*n+2)*(4*n+3)*(4*n+5)(4*n+6)*(4*n+7)) = 22/7 - Pi shows that 22/7 is an over-approximation to Pi. - Peter Bala, Oct 12 2021

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See pp. 187, 239.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §3.6 The Quest for Pi and §13.3 Solving Triangles, pp. 90, 479.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 49.

Crossrefs

Programs

  • Magma
    I:=[3,1,4,2,8]; [n le 5 select I[n] else Self(n-1)-Self(n-3)+Self(n-4): n in [1..100]]; // Vincenzo Librandi, Mar 27 2015
  • Mathematica
    CoefficientList[Series[(3 - 2 x + 3 x^2 + x^3 + 4 x^4) / ((1 - x) (1 + x) (1 - x + x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 27 2015 *)
    Join[{3},LinearRecurrence[{1, 0, -1, 1},{1, 4, 2, 8},104]] (* Ray Chandler, Aug 26 2015 *)
    RealDigits[22/7,10,120][[1]] (* Harvey P. Dale, Oct 04 2021 *)

Formula

a(0)=3, a(n) = floor(714285/10^(5-(n mod 6))) mod 10. - Sascha Kurz, Mar 23 2002 [corrected by Jason Yuen, Aug 18 2024]
Equals 100*A021018 - 4 = 3 + A020806. - R. J. Mathar, Sep 30 2008
For n>1 a(n) = A020806(n-2) (note offset=0 in A020806 and offset=1 in A068028). - Zak Seidov, Mar 26 2015
G.f.: x*(3-2*x+3*x^2+x^3+4*x^4)/((1-x)*(1+x)*(1-x+x^2)). - Vincenzo Librandi, Mar 27 2015

Extensions

More terms from Sascha Kurz, Mar 23 2002
Alternative to broken link added by R. J. Mathar, Jun 18 2010

A351474 Numbers m such that the largest digit in the decimal expansion of 1/m is 8.

Original entry on oeis.org

7, 12, 14, 26, 28, 35, 48, 54, 55, 56, 63, 65, 70, 72, 78, 79, 93, 117, 120, 123, 125, 128, 140, 175, 176, 186, 192, 195, 205, 224, 239, 259, 260, 264, 280, 296, 312, 318, 328, 350, 372, 416, 432, 438, 448, 465, 480, 540, 542, 546, 548, 550, 555, 560, 572, 584, 594, 630, 632, 650, 675
Offset: 1

Views

Author

Keywords

Comments

If k is a term, 10*k is also a term. First few primitive terms are 7, 12, 14, 26, 28, 35, 48, 54, 55, 56, 63, 65, 72, ...
The seven primes up to 2.7*10^8 are 7, 79, 239, 62003, 538987, 35121409, 265371653 (see comments in A333237, example section and Crossrefs).

Examples

			As 1/7 = 0.142857142857142857..., 7 is a term.
As 1/26 = 0.0384615384615384615..., 26 is another term.
		

Crossrefs

Similar with largest digit k: A333402 (k=1), A341383 (k=2), A350814 (k=3), A351470 (k=4), A351471 (k=5), A351472 (k=6), A351473 (k=7), this sequence (k=8), A333237 (k=9).
Cf. A333236.
Decimal expansion of: A020806 (1/7), A021058 (1/54), A021060 (1/56), A021067 (1/63), A021069 (1/65), A021083 (1/79), A021097 (1/93).

Programs

  • Mathematica
    f[n_] := Union[ Flatten[ RealDigits[ 1/n][[1]] ]]; Select[Range@1500000, Max@ f@# == 8 &]
  • PARI
    isok(m) = my(m2=valuation(m, 2), m5=valuation(m, 5)); vecmax(digits(floor(10^(max(m2,m5) + znorder(Mod(10, m/2^m2/5^m5))+1)/m))) == 8; \\ Michel Marcus, Feb 26 2022
    
  • Python
    from itertools import count, islice
    from sympy import multiplicity, n_order
    def A351474_gen(startvalue=1): # generator of terms >= startvalue
        for a in count(max(startvalue,1)):
            m2, m5 = (~a&a-1).bit_length(), multiplicity(5,a)
            k, m = 10**max(m2,m5), 10**n_order(10,a//(1<A351474_list = list(islice(A351474_gen(),20)) # Chai Wah Wu, May 02 2023

Formula

A333236(a(n)) = 8.

A021069 Decimal expansion of 1/65.

Original entry on oeis.org

0, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5, 3, 8, 4, 6, 1, 5
Offset: 0

Views

Author

Keywords

Comments

Without the leading 0 also the decimal expansion of 2/13.

Examples

			0.0153846153846...  - _Natan Arie Consigli_, Sep 18 2016
		

Crossrefs

Programs

Formula

Equals 2 - 24/13. See Táfula link. - Michel Marcus, May 31 2024
G.f.: x*(1 + 4*x - 2*x^2 + 6*x^3)/((1 - x)*(1 + x)*(1 - x + x^2)). - Stefano Spezia, Apr 30 2025

A242824 Primes formed by the initial digits of the decimal expansion of 1/7, starting at the first nonzero digit in the expansion.

Original entry on oeis.org

1428571, 1428571428571428571428571
Offset: 1

Views

Author

Felix Fröhlich, May 23 2014

Keywords

Comments

Next term has 355 digits.
All terms are of the form 6x+1; a(4) has 823 digits; and there are no further terms up to and including 10000 digits. - Harvey P. Dale, Oct 03 2018

Crossrefs

Corresponding sequences for 1/k: A093676 (k=12), A242826 (k=13), A242827 (k=14), A242828 (k=17), A242833 (k=19).

Programs

  • Mathematica
    Select[Table[FromDigits[PadRight[{},6n+1,{1,4,2,8,5,7}]],{n,200}],PrimeQ](* Harvey P. Dale, Oct 03 2018 *)
Showing 1-10 of 36 results. Next