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 71-79 of 79 results.

A169678 The second of a pair of sequences A and B with property that all the differences |a_i - b_j| are distinct - for precise definition see Comments lines in A169677.

Original entry on oeis.org

0, 3, 12, 26, 45, 72, 105, 149, 199, 255, 316, 392, 401, 502, 596, 733, 865, 891, 1086, 1119, 1311, 1330, 1646, 1773, 2011, 2324, 2371, 2554, 2692, 3055, 3258, 3820, 3960, 4063, 4606, 5126, 5515, 5535, 6228, 6233, 7134, 7515, 7861, 8619
Offset: 1

Views

Author

R. K. Guy and N. J. A. Sloane, Mar 27 2010

Keywords

Comments

Computed by Alois P. Heinz and Wouter Meeussen, Mar 27 2010

Crossrefs

A001042 a(n) = a(n-1)^2 - a(n-2)^2.

Original entry on oeis.org

1, 2, 3, 5, 16, 231, 53105, 2820087664, 7952894429824835871, 63248529811938901240357985099443351745, 4000376523371723941902615329287219027543200136435757892789536976747706216384
Offset: 0

Views

Author

Keywords

Comments

The next term has 152 digits. - Franklin T. Adams-Watters, Jun 11 2009

References

  • Archimedeans Problems Drive, Eureka, 27 (1964), 6.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A064236 (numbers of digits).

Programs

  • Haskell
    a001042 n = a001042_list !! n
    a001042_list = 1 : 2 : zipWith (-) (tail xs) xs
                   where xs = map (^ 2) a001042_list
    -- Reinhard Zumkeller, Dec 16 2013
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==2,a[n]==a[n-1]^2-a[n-2]^2},a,{n,0,12}] (* Harvey P. Dale, Jan 11 2013 *)

Formula

a(n) ~ c^(2^n), where c = 1.1853051643868354640833201434870139866230288004895868726506278977814490371... . - Vaclav Kotesovec, Dec 17 2014

Extensions

More terms from James Sellers, Sep 19 2000.

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

Original entry on oeis.org

1, 3, 4, 13, 53, 690, 36571, 25233991, 922832284862, 23286741570717144243, 21489756930695820973683319349467, 500426416062641238759467086706254193219790764168482, 10754042042885415070816603338436200915110904821126871858491675028294447933424899095
Offset: 0

Views

Author

Keywords

References

  • Archimedeans Problems Drive, Eureka, 19 (1957), 13.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A001622 (phi), A258112.

Programs

  • GAP
    a:=[1,3];; for n in [3..13] do a[n]:=a[n-1]*a[n-2]+1; od; a; # G. C. Greubel, Sep 19 2019
  • Haskell
    a001056 n = a001056_list !! n
    a001056_list = 1 : 3 : (map (+ 1 ) $
                   zipWith (*) a001056_list $ tail a001056_list)
    -- Reinhard Zumkeller, Aug 15 2012
    
  • Magma
    I:=[1,3]; [n le 2 select I[n] else Self(n-1)*Self(n-2) + 1: n in [1..13]]; // G. C. Greubel, Sep 19 2019
    
  • Maple
    a:= proc (n) option remember;
    if n=0 then 1
    elif n=1 then 3
    else a(n-1)*a(n-2) + 1
    end if
    end proc;
    seq(a(n), n = 0..13); # G. C. Greubel, Sep 19 2019
  • Mathematica
    RecurrenceTable[{a[0]==1,a[1]==3,a[n]==a[n-1]*a[n-2]+1},a,{n,0,14}] (* Harvey P. Dale, Jul 17 2011 *)
    t = {1, 3}; Do[AppendTo[t, t[[-1]] * t[[-2]] + 1], {n, 2, 14}] (* T. D. Noe, Jun 25 2012 *)
  • PARI
    m=13; v=concat([1,3], vector(m-2)); for(n=3, m, v[n]=v[n-1]*v[n-2] +1 ); v \\ G. C. Greubel, Sep 19 2019
    
  • Sage
    def a(n):
        if (n==0): return 1
        elif (n==1): return 3
        else: return a(n-1)*a(n-2) + 1
    [a(n) for n in (0..13)] # G. C. Greubel, Sep 19 2019
    

Formula

a(n) ~ c^(phi^n), where c = A258112 = 1.7978784900091604813559508837..., phi = (1+sqrt(5))/2 = A001622. - Vaclav Kotesovec, Dec 17 2014

A036688 Number of distinct n-digit suffixes of base-10 squares not containing the digit 0.

Original entry on oeis.org

5, 18, 119, 698, 5449, 41735, 359207, 3085197, 27434602, 243921771, 2188569304, 19636586858
Offset: 1

Views

Author

Keywords

Examples

			Any square ends with one of [ 0 ], 1, 4, 5, 6, 9, so a(1) = 5.
a(3) = A000993(3) - a(2) - #{100, 104, 201, 204, 209, 304, 400, 401, 404, 409, 500, 504, 600, 601, 604, 609, 704, 801, 804, 809, 900, 904} = 159 - 18 - 22 = 119, cf. A122986. - _Reinhard Zumkeller_, Mar 21 2010
		

Crossrefs

Cf. A036788.

Programs

Extensions

Explanation and more terms from David W. Wilson
a(11)-a(12) from Bert Dobbelaere, Mar 10 2021

A049343 Numbers m such that 2m and m^2 have same digit sum.

Original entry on oeis.org

0, 2, 9, 11, 18, 20, 29, 38, 45, 47, 90, 99, 101, 110, 119, 144, 146, 180, 182, 189, 198, 200, 245, 290, 299, 335, 344, 351, 362, 369, 380, 398, 450, 452, 459, 461, 468, 470, 479, 488, 495, 497, 639, 729, 794, 839, 848, 900, 929, 954, 990, 999
Offset: 1

Views

Author

Keywords

Comments

An easy way to prove that this sequence is infinite is to observe that it contains all numbers of the form 10^k+1. - Stefan Steinerberger, Mar 31 2006
For n>0: digital root (A010888) of 2n or n^2 is either 4 or 9. - Reinhard Zumkeller, Oct 01 2007

References

  • Problem 117 in Loren Larson's translation of Paul Vaderlind's book.

Crossrefs

Cf. A058369, A077436 (binary). - Reinhard Zumkeller, Apr 03 2011

Programs

  • Haskell
    import Data.List (elemIndices)
    import Data.Function (on)
    a049343 n = a049343_list !! (n-1)
    a049343_list = elemIndices 0
       $ zipWith ((-) `on` a007953) a005843_list a000290_list
    -- Reinhard Zumkeller, Apr 03 2011
    
  • Magma
    [n: n in [0..1000] | &+Intseq(2*n) eq &+Intseq(n^2)]; // Vincenzo Librandi, Nov 17 2015
  • Mathematica
    Select[Range[0, 1000], Sum[DigitCount[2# ][[i]]*i, {i, 1, 9}] == Sum[DigitCount[ #^2][[i]]*i, {i, 1, 9}] &] (* Stefan Steinerberger, Mar 31 2006 *)
    Select[Range[0,1000],Total[IntegerDigits[2#]]==Total[ IntegerDigits[ #^2]]&] (* Harvey P. Dale, Sep 25 2012 *)

Formula

A007953(A005843(a(n))) = A007953(A000290(a(n))). - Reinhard Zumkeller, Oct 01 2007

A005530 Number of Boolean functions of n variables from Post class F(8,inf); number of degenerate Boolean functions of n variables.

Original entry on oeis.org

2, 6, 38, 942, 325262, 25768825638, 129127208425774833206, 2722258935367507707190488025630791841374
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • I. Tomescu, Introducere in Combinatorica. Editura Tehnica, Bucharest, 1972, p. 129.

Crossrefs

a(n) = 2^(2^n) - A000371(n). Cf. A036239, A036240.

Programs

  • Mathematica
    Sum[(-1)^(j + 1) Binomial[n, j] 2^2^(n - j), {j, 1, n}]
  • PARI
    for(n=1,10, print1(sum(j=1,n, (-1)^(j+1)*binomial(n,j)*2^(2^(n-j))), ", ")) \\ G. C. Greubel, Oct 06 2017

Formula

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

Extensions

More terms from Vladeta Jovovic, Goran Kilibarda

A038122 Start with {1,2,...,n}, replace any two numbers a,b with |a^2-b^2|, repeat until single number k remains; a(n) = minimal value of k.

Original entry on oeis.org

1, 3, 0, 16, 15, 63, 8, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0, 3, 1, 0, 0, 1, 3, 0, 4, 3, 3, 4, 0
Offset: 1

Views

Author

Keywords

Comments

Due mostly to the efforts of Dean Hickerson, supported by David W. Wilson and Michael Kleber, it is now known that this has period 12 beginning at n=8.

Examples

			a(2) = 3 from (1,2); a(3) = 0 from ((1,2),3); a(4) = 16 from (((1,2),3),4); a(5) = 15 from ((((2,3),5),1),4)
a(6) = 63 from (((1,4),(3,5)),(2,6)) [ _Michael Kleber_ ]
a(7) = 8 from (((((4,5),6),(2,7)),1),3) [ Kleber ]
a(8) = 0 from ((((4,5),7)(2,6))((1,3),8)) [ Guy ]
a(9) = 3 from (2,(1,(((6,7),((3,4),8)),(5,9)))) [ Kleber ]
a(10)= 1 from ((((((((4,5),9),6),(8,10)),2),3),7),1) [ This and the following are due to _Dean Hickerson_ ]
a(11)= 0 from ((((((3,7),(9,11)),6),(8,10)),(1,2)),(4,5))
a(12)= 0 from ((((((1,3),7),(8,10)),(((5,6),9),(11,12))),2),4)
a(13)= 1 from (((((((((3,7),(9,11)),6),(8,10)),5),(12,13)),2),4),1) ...
		

Programs

  • Mathematica
    LinearRecurrence[{0,0,1,0,0,-1,0,0,1},{1,3,0,16,15,63,8,0,3,1,0,0,1,3,0,4},120] (* Harvey P. Dale, Jul 29 2015 *)
  • PARI
    a(n)=if(n<4||n>7, n*(n+1)/2%6, [16, 15, 63, 8][n-3]) \\ Charles R Greathouse IV, Feb 10 2017
    
  • Python
    def A038122(n): return (16,15,63,8)[n-4] if 3>1)%6 # Chai Wah Wu, Apr 17 2025

Formula

For n<4 and n>7, a(n) = n*(n+1)/2 mod 6 = A010875(A000217(n)). - Henry Bottomley, Feb 24 2003
a(n) = a(n-3)-a(n-6)+a(n-9) for n>16. - Colin Barker, Oct 01 2014
G.f.: x*(4*x^15 +60*x^14 +12*x^13 +8*x^12 -60*x^11 -12*x^10 -8*x^9 +60*x^8 +12*x^7 +7*x^6 -63*x^5 -12*x^4 -15*x^3 -3*x -1) / ((x -1)*(x^2 +1)*(x^2 +x +1)*(x^4 -x^2 +1)). - Colin Barker, Oct 01 2014

A110081 Integers n such that the digit set D = (0, 1, -n) used in base 3 expansions of the form Sum_{ -N < j < oo} d_j 3^{-j}, all d_j in D, can represent all real numbers.

Original entry on oeis.org

1, 7, 25, 31, 37, 73, 79, 85, 97, 103, 193, 241, 253, 271, 313, 319, 337, 343, 361, 517, 553, 661, 703, 721, 727, 733, 745, 751, 781, 799, 805, 865, 925, 943, 967, 1015, 1039, 1081, 1087, 1633, 1687, 1705, 1837, 1981, 2125, 2137, 2143, 2185, 2191, 2233, 2257, 2263, 2341, 2581, 2593, 2605, 2641, 2719, 2761, 2797, 2815, 2833, 2857, 2887, 2893, 2911, 3127
Offset: 1

Views

Author

N. J. A. Sloane, based on correspondence from R. K. Guy and Jeff Lagarias, Aug 31 2005

Keywords

Comments

All nonnegative reals can be represented with ternary digits 0, 1, 2. If you're not allowed to use 2, then you only get something like the Cantor set. But you're back in business if you're allowed to use 0, 1, -1 - this gives the "balanced" ternary representation (so 1 is in the sequence).
The sequence is known to be infinite and irregular and is conjectured to have density zero.

Examples

			13/18 = 0.122111111111... in ternary which can't be represented without the 2's. But it is 10.x0111111111... if x = -7: 3 + 0 + (-7)/3 + 1/3^3 + 1/3^4 + 1/3^5 + ... = 3 - 7/3 + (1/27)/(1-(1/3)) = 13/18.
		

References

  • J. C. Lagarias, Crystals, Tilings and Packings, Hedrick Lectures, Math. Assoc. America MathFest, 2005.

Extensions

More terms using Don Reble's program from Joerg Arndt, Sep 17 2017

A039958 Class number of maximal order in real quadratic field of radicand n.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Mollin gives a table for n < 10000.

References

  • R. A. Mollin, Quadratics, CRC Press, 1996, Table C1.
Previous Showing 71-79 of 79 results.