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.

User: David Johnson-Davies

David Johnson-Davies's wiki page.

David Johnson-Davies has authored 7 sequences.

A330581 a(0) = 2; thereafter a(n) = a(n - 1)^n + 1.

Original entry on oeis.org

2, 3, 10, 1001, 1004006004002, 1020191144865623440455270145683555422808365843606721760320033
Offset: 0

Author

David Johnson-Davies, Dec 18 2019

Keywords

Comments

Note that this could be extended backwards to a(-1), and any nonzero value x for a(-1) would work, since x^0 + 1 = 2.

Crossrefs

Programs

  • Lisp
    (defun a (n) (+ (if (zerop n) 1 (expt (a (- n 1)) n)) 1))
    
  • Maple
    a:= proc(n) option remember; `if`(n<0, %,
          1 + a(n-1)^n)
        end:
    seq(a(n), n=0..5);  # Alois P. Heinz, Dec 18 2019
  • Mathematica
    a[0] = 2; a[n_] := a[n] = a[n - 1]^n + 1; Array[a, 6, 0] (* Amiram Eldar, Dec 19 2019 *)
    nxt[{n_,a_}]:={n+1,a^(n+1)+1}; NestList[nxt,{0,2},5][[;;,2]] (* Harvey P. Dale, Dec 10 2023 *)
  • PARI
    a(n) = if(n==0, 2, a(n-1)^n+1) \\ Felix Fröhlich, Dec 18 2019

Extensions

Edited by N. J. A. Sloane, Dec 27 2019

A048122 a(1) = 1, a(2) = 2, a(n) = a(n-1)^3 - a(n-2)^3.

Original entry on oeis.org

1, 2, 7, 335, 37595032, 53136308104856854277393, 150028625136232090492356612601560283583272160844416809510162344944689
Offset: 1

Keywords

Comments

Next terms are 205 and 614 digits long.

Crossrefs

Cf. A048112.

Programs

  • Mathematica
    RecurrenceTable[{a[1]==1,a[2]==2,a[n]==a[n-1]^3-a[n-2]^3},a,{n,8}] (* Harvey P. Dale, Mar 20 2013 *)

Extensions

More terms from Patrick De Geest, Jun 15 1999

A048572 a(n) = sum of digits of a(n-1)*a(n-2).

Original entry on oeis.org

1, 2, 2, 4, 8, 5, 4, 2, 8, 7, 11, 14, 10, 5, 5, 7, 8, 11, 16, 14, 8, 4, 5, 2, 1, 2, 2, 4, 8, 5, 4, 2, 8, 7, 11, 14, 10, 5, 5, 7, 8, 11, 16, 14, 8, 4, 5, 2, 1, 2, 2, 4, 8, 5, 4, 2, 8, 7, 11, 14, 10, 5, 5, 7, 8, 11, 16, 14, 8, 4, 5, 2
Offset: 1

Keywords

Comments

This sequence is periodic with period 24. - T. D. Noe, Feb 15 2008

Programs

  • Mathematica
    Nest[Append[#,Total[IntegerDigits[Last[#]#[[-2]]]]]&,{1,2},80]  (* Harvey P. Dale, Apr 21 2011 *)
    PadRight[{},100,{1,2,2,4,8,5,4,2,8,7,11,14,10,5,5,7,8,11,16,14,8,4,5,2}] (* Harvey P. Dale, Jan 18 2015 *)

Formula

a(n) = a(n-24) for n >= 25. - Wesley Ivan Hurt, Mar 09 2023

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

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 16, 63, 395, 7328, 486549, 195081415, 1433122040192, 697379012200764243, 136045964066902820948075525, 194970470582876525091946983913863955456
Offset: 1

Keywords

Crossrefs

Cf. A048122.

Programs

  • Mathematica
    RecurrenceTable[{a[1]==a[2]==a[3]==1,a[n]==a[n-3] (a[n-2]+a[n-1])},a,{n,20}] (* Harvey P. Dale, Jan 14 2012 *)
    nxt[{a_,b_,c_}]:={b,c,a(b+c)}; NestList[nxt,{1,1,1},20][[;;,1]] (* Harvey P. Dale, Jul 14 2024 *)

Extensions

More terms from Patrick De Geest, Jun 15 1999

A048784 a(n) = tau(binomial(2*n,n)), where tau = number of divisors (A000005).

Original entry on oeis.org

1, 2, 4, 6, 8, 18, 24, 32, 48, 48, 48, 128, 96, 192, 384, 480, 384, 768, 1152, 1536, 2304, 2048, 2048, 3840, 3456, 4608, 6144, 3840, 8192, 20480, 10240, 12288, 18432, 36864, 36864, 49152, 24576, 32768, 98304, 92160, 73728, 245760, 262144
Offset: 0

Keywords

Crossrefs

Programs

  • Maple
    A048784 := proc(n)
        numtheory[tau](binomial(2*n,n)) ;
    end proc:
    seq(A048784(n),n=0..30) ; # R. J. Mathar, Jul 12 2024
  • Mathematica
    f[n_] := DivisorSigma[0, Binomial[2 n, n]]; Table[f@n, {n, 0, 42}] (* Robert G. Wilson v, Apr 08 2009 *)
  • PARI
    fv(n,p)=my(s);while(n\=p,s+=n);s
    a(n)=my(s=1);forprime(p=2,2*n,s*=fv(2*n,p)-2*fv(n,p)+1);s \\ Charles R Greathouse IV, Aug 21 2013

Formula

a(n) = A000005(A000984(n)). - Michel Marcus, Aug 21 2013
log(a(n)) = log(2) * (pi(2*n)-pi(n)) + log(2) * (n/log(n)) * Sum_{k=0..T} c_k/log(n)^k + O(n/log(n)^(T+2)) for any T >= 0, where c_k = Sum_{m>=1} Integral_{m+1/2..m+1} log(t)^m/t^2 dt. In particular for T = 0, log(a(n)) = 2 * log(2)^2 * (n/log(n)) + O(n/log(n)^2) (Fedorov, 2013). - Amiram Eldar, Dec 10 2024

A048691 a(n) = d(n^2), where d(k) = A000005(k) is the number of divisors of k.

Original entry on oeis.org

1, 3, 3, 5, 3, 9, 3, 7, 5, 9, 3, 15, 3, 9, 9, 9, 3, 15, 3, 15, 9, 9, 3, 21, 5, 9, 7, 15, 3, 27, 3, 11, 9, 9, 9, 25, 3, 9, 9, 21, 3, 27, 3, 15, 15, 9, 3, 27, 5, 15, 9, 15, 3, 21, 9, 21, 9, 9, 3, 45, 3, 9, 15, 13, 9, 27, 3, 15, 9, 27, 3, 35, 3, 9, 15, 15, 9, 27, 3, 27
Offset: 1

Keywords

Comments

Inverse Moebius transform of A034444: Sum_{d|n} 2^omega(d), where omega(n) = A001221(n) is the number of distinct primes dividing n.
Number of elements in the set {(x,y): x|n, y|n, gcd(x,y)=1}.
Number of elements in the set {(x,y): lcm(x,y)=n}.
Also gives total number of positive integral solutions (x,y), order being taken into account, to the optical or parallel resistor equation 1/x + 1/y = 1/n. Indeed, writing the latter as X*Y=N, with X=x-n, Y=y-n, N=n^2, the one-to-one correspondence between solutions (X, Y) and (x, y) is obvious, so that clearly, the solution pairs (x, y) are tau(N)=tau(n^2) in number. - Lekraj Beedassy, May 31 2002
Number of ordered pairs of positive integers (a,c) such that n^2 - ac = 0. Therefore number of quadratic equations of the form ax^2 + 2nx + c = 0 where a,n,c are positive integers and each equation has two equal (rational) roots, -n/a. (If a and c are positive integers, but, instead, the coefficient of x is odd, it is impossible for the equation to have equal roots.) - Rick L. Shepherd, Jun 19 2005
Problem A1 on the 21st Putnam competition in 1960 (see John Scholes link) asked for the number of pairs of positive integers (x,y) such that xy/(x+y) = n: the answer is a(n); for n = 4, the a(4) = 5 solutions (x,y) are (5,20), (6,12), (8,8), (12,6), (20,5). - Bernard Schott, Feb 12 2023
Numbers k such that a(k)/d(k) is an integer are in A217584 and the corresponding quotients are in A339055. - Bernard Schott, Feb 15 2023

References

  • A. M. Gleason et al., The William Lowell Putnam Mathematical Competitions, Problems & Solutions:1938-1960 Soln. to Prob. 1 1960, p. 516, MAA, 1980.
  • Ross Honsberger, More Mathematical Morsels, Morsel 43, pp. 232-3, DMA No. 10 MAA, 1991.
  • Loren C. Larson, Problem-Solving Through Problems, Prob. 3.3.7, p. 102, Springer 1983.
  • Alfred S. Posamentier and Charles T. Salkind, Challenging Problems in Algebra, Prob. 9-9 pp. 143 Dover NY, 1988.
  • D. O. Shklarsky et al., The USSR Olympiad Problem Book, Soln. to Prob. 123, pp. 28, 217-8, Dover NY.
  • Wacław Sierpiński, Elementary Theory of Numbers, pp. 71-2, Elsevier, North Holland, 1988.
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 91.
  • Charles W. Trigg, Mathematical Quickies, Question 194, pp. 53, 168, Dover, 1985.

Crossrefs

Partial sums give A061503.
For similar LCM sequences, see A070919, A070920, A070921.
For the earliest occurrence of 2n-1 see A016017.

Programs

Formula

a(n) = A000005(A000290(n)).
tau(n^2) = Sum_{d|n} mu(n/d)*tau(d)^2, where mu(n) = A008683(n), cf. A061391.
Multiplicative with a(p^e) = 2e+1. - Vladeta Jovovic, Jul 23 2001
Also a(n) = Sum_{d|n} (tau(d)*moebius(n/d)^2), Dirichlet convolution of A000005 and A008966. - Benoit Cloitre, Sep 08 2002
a(n) = A055205(n) + A000005(n). - Reinhard Zumkeller, Dec 08 2009
Dirichlet g.f.: (zeta(s))^3/zeta(2s). - R. J. Mathar, Feb 11 2011
a(n) = Sum_{d|n} 2^omega(d). Inverse Mobius transform of A034444. - Enrique Pérez Herrero, Apr 14 2012
G.f.: Sum_{k>=1} 2^omega(k)*x^k/(1 - x^k). - Ilya Gutkovskiy, Mar 10 2018
Sum_{k=1..n} a(k) ~ n*(6/Pi^2)*(log(n)^2/2 + log(n)*(3*gamma - 1) + 1 - 3*gamma + 3*gamma^2 - 3*gamma_1 + (2 - 6*gamma - 2*log(n))*zeta'(2)/zeta(2) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2)), where gamma is Euler's constant (A001620) and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Jan 26 2023

Extensions

Additional comments from Vladeta Jovovic, Apr 29 2001

A048736 Dana Scott's sequence: a(n) = (a(n-2) + a(n-1) * a(n-3)) / a(n-4), a(0) = a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 13, 22, 41, 111, 191, 361, 982, 1693, 3205, 8723, 15042, 28481, 77521, 133681, 253121, 688962, 1188083, 2249605, 6123133, 10559062, 19993321, 54419231, 93843471, 177690281, 483649942, 834032173, 1579219205, 4298430243, 7412446082, 14035282561, 38202222241, 65877982561
Offset: 0

Comments

The recursion has the Laurent property. If a(0), a(1), a(2), a(3) are variables, then a(n) is a Laurent polynomial (a rational function with a monic monomial denominator). - Michael Somos, Feb 05 2012
A generalization is if the recursion is modified to a(n) = (a(n-2) + a(n-1) * b*a(n-3)) / a(n-4) where b is a constant, and with arbitrary nonzero initial values, (a(0), a(1), a(2), a(3)), then a(n) = c*(a(n-3) - a(n-6)) + a(n-9) for all n in Z where c is another constant. - Michael Somos, Oct 28 2021

Examples

			G.f. = 1 + x + x^2 + x^3 + 2*x^4 + 3*x^5 + 13*x^6 + 22*x^7 + 41*x^8 + 111*x^9 + ...
		

Crossrefs

Cf. A192241, A192242 (primes and where they occur).
Cf. A276531.

Programs

  • Haskell
    a048736 n = a048736_list !! n
    a048736_list = 1 : 1 : 1 : 1 :
       zipWith div
         (zipWith (+)
           (zipWith (*) (drop 3 a048736_list)
                        (drop 1 a048736_list))
           (drop 2 a048736_list))
         a048736_list
    -- Reinhard Zumkeller, Jun 26 2011
    
  • Magma
    I:=[1,1,1,1]; [n le 4 select I[n] else (Self(n-2) + Self(n-1)*Self(n-3)) / Self(n-4): n in [1..30]]; // G. C. Greubel, Feb 20 2018
  • Maple
    P:=proc(q) local n,v; v:=[1,1,1,1]; for n from 1 to q do
    v:=[op(v),(v[-2]+v[-1]*v[-3])/v[-4]] od: op(v); end: P(35); # Paolo P. Lava, Aug 24 2025
  • Mathematica
    RecurrenceTable[{a[0] == a[1] == a[2] == a[3] == 1, a[n] == (a[n - 2] + a[n - 1]a[n - 3])/a[n - 4]}, a[n], {n, 40}] (* or *) LinearRecurrence[{0, 0, 10, 0, 0, -10, 0, 0, 1}, {1, 1, 1, 1, 2, 3, 5, 13, 22}, 41] (* Harvey P. Dale, Oct 22 2011 *)
  • PARI
    Vec((1+x+x^2-9*x^3-8*x^4-7*x^5+5*x^6+3*x^7+2*x^8) / (1-10*x^3+10*x^6-x^9)+O(x^99)) \\ Charles R Greathouse IV, Jul 01 2011
    

Formula

a(n) = 9*a(n-3) - a(n-6) - 3 - ( ceiling(n/3) - floor(n/3) ), with a(0) = a(1) = a(2) = a(3) = 1, a(4) = 2, a(5) = 3. - Michael Somos
From Jaume Oliver Lafont, Sep 17 2009: (Start)
a(n) = 10*a(n-3) - 10*a(n-6) + a(n-9).
G.f.: (1 + x + x^2 - 9*x^3 - 8*x^4 - 7*x^5 + 5*x^6 + 3*x^7 + 2*x^8)/(1 - 10*x^3 + 10*x^6 - x^9). (End)
a(n) = a(3-n) for all n in Z. - Michael Somos, Feb 05 2012

Extensions

More terms from Michael Somos