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

A167710 a(n) = 10*2^n - 3*A083658(n+2).

Original entry on oeis.org

1, 5, 13, 35, 79, 185, 397, 875, 1831, 3905, 8053, 16835, 34399, 70985, 144157, 294875, 596311, 1212305, 2444293, 4947635, 9954319, 20085785, 40348717, 81228875, 162989191, 327572705, 656739733, 1318262435, 2641307839, 5296964585, 10608278077, 21259602875
Offset: 0

Views

Author

Paul Curtz, Nov 10 2009

Keywords

Comments

The sequence can be defined as the row sums of the triangle T(n,k)
.1;
.3,.2;
.3,.6,.4;
.9,.6,12,.8;
.9,18,12,24,16;
27,18,36,24,48,32;
with left column A162436, diagonal the powers of 2, and the recurrence T(n+2,k) = 3*T(n,k).

Programs

  • Mathematica
    LinearRecurrence[{2,3,-6},{1,5,13},40] (* Harvey P. Dale, Oct 03 2014 *)

Formula

a(n+1) - 2*a(n) = A162436(n+2).
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3).
G.f.: (1+3*x)/((2*x-1) * (3*x^2-1)). - R. J. Mathar, Feb 27 2010

Extensions

Replaced cross-references by link to the index - R. J. Mathar, Feb 27 2010

A167936 a(n) = 2^n - A108411(n).

Original entry on oeis.org

0, 1, 1, 5, 7, 23, 37, 101, 175, 431, 781, 1805, 3367, 7463, 14197, 30581, 58975, 124511, 242461, 504605, 989527, 2038103, 4017157, 8211461, 16245775, 33022991, 65514541, 132623405, 263652487, 532087943, 1059392917, 2133134741, 4251920575, 8546887871
Offset: 0

Views

Author

Paul Curtz, Nov 15 2009

Keywords

Comments

The binomial transform of (0 followed by A077917).

Crossrefs

Programs

  • Magma
    I:=[0,1,1]; [n le 3 select I[n] else 2*Self(n-1) +3*Self(n-2) -6*Self(n-3): n in [1..40]]; // G. C. Greubel, Sep 10 2023
    
  • Mathematica
    LinearRecurrence[{2,3,-6}, {0,1,1}, 50] (* G. C. Greubel, Jul 01 2016 *)
  • Python
    def A167936(n): return (1<>1) # Chai Wah Wu, Nov 14 2023
  • SageMath
    def A167936(n): return 2^n - ((n+1)%2)*3^(n//2) - (n%2)*3^((n-1)//2)
    [A167936(n) for n in range(41)] # G. C. Greubel, Sep 10 2023
    

Formula

a(n) = A167762(n+1) - A167762(n).
a(n+1) - a(n) = A167784(n).
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3).
G.f.: x*(1-x)/((1-2*x)*(1-3*x^2)).
a(2n) = A005061(n), a(2n+1) = A085350(n).
a(n) - 2*a(n-1) = (-1)^(n+1)*A083658(n+1).
From G. C. Greubel, Sep 10 2023: (Start)
a(n) = (1/2)*(2^(n+1) - (1+(-1)^n)*3^(n/2) - (1-(-1)^n)*3^((n-1)/2)).
E.g.f.: exp(2*x) - cosh(sqrt(3)*x) - (1/sqrt(3))*sinh(sqrt(3)*x). (End)

Extensions

Edited and extended by R. J. Mathar, Feb 27 2010

A118306 If n = product{k>=1} p(k)^b(n,k), where p(k) is the k-th prime and where each b(n,k) is a nonnegative integer, then: If n occurs earlier in the sequence, then a(n) = product{k>=2} p(k-1)^b(n,k); If n does not occur earlier in the sequence, then a(n) = product{k>=1} p(k+1)^b(n,k).

Original entry on oeis.org

1, 3, 2, 9, 7, 15, 5, 27, 4, 21, 13, 45, 11, 33, 6, 81, 19, 75, 17, 63, 10, 39, 29, 135, 49, 51, 8, 99, 23, 105, 37, 243, 14, 57, 77, 225, 31, 69, 22, 189, 43, 165, 41, 117, 12, 87, 53, 405, 25, 147, 26, 153, 47, 375, 91, 297, 34, 93, 61, 315, 59, 111, 20, 729, 119, 195, 71
Offset: 1

Views

Author

Leroy Quet, May 14 2006

Keywords

Comments

Sequence is a permutation of the positive integers and it is its own inverse permutation.
From Antti Karttunen, Nov 05 2016: (Start)
A016945 gives the positions of even terms.
A007310 is closed with respect to this permutation. See A277911 for the permutation induced.
A029744 (without 3) seems to give the positions of records in this sequence (note that it gives the record positions in related A003961 and A048673) which implies that A083658 (without its term 5) would then give the record values.
(End)

Crossrefs

Programs

  • Maple
    A064989 := proc(n) local a,ifs,p ; a := 1 ; ifs := ifactors(n)[2] ; for p in ifs do if op(1,p) > 2 then a := a* prevprime(op(1,p))^op(2,p) ; fi ; od; RETURN(a) ; end: A003961 := proc(n) local a,ifs,p ; a := 1 ; ifs := ifactors(n)[2] ; for p in ifs do a := a* nextprime(op(1,p))^op(2,p) ; od; RETURN(a) ; end: A118306 := proc(nmin) local a,anxt,i,n ; a := [1] ; while nops(a) < nmin do n := nops(a)+1 ; if n in a then anxt := A064989(n) ; else anxt := A003961(n) ; fi ; a := [op(a),anxt] ; od; a ; end: A118306(100) ; # R. J. Mathar, Sep 06 2007
  • PARI
    A118306(n) = { if(1==n, 1, my(f = factor(n)); my(d = (-1)^primepi(f[1, 1])); for(i=1, #f~, f[i, 1] = prime(primepi(f[i, 1])-d)); factorback(f)); }; \\ Antti Karttunen, Nov 06 2016
    for(n=1, 10001, write("b118306.txt", n, " ", A118306(n)));
    
  • Scheme
    (define (A118306 n) (cond ((= 1 n) n) ((odd? (A055396 n)) (A003961 n)) (else (A064989 n)))) ;; Antti Karttunen, Nov 05 2016

Formula

From Antti Karttunen, Nov 05 2016: (Start)
a(1) = 1; and for n > 1, if n = a(k) for some k = 1 .. n-1, then a(n) = A064989(n), otherwise a(n) = A003961(n). [After the original definition and R. J. Mathar's Maple-code]
a(1) = 1, and for n > 1, if A055396(n) is odd, a(n) = A003961(n), otherwise a(n) = A064989(n). [The above reduces to this.]
a(n) = product{k>=1} prime(k-((-1)^A055396(n)))^e(k) when n = product{k>=1} prime(k)^e(k).
a(2n) = A249734(n) and a(A249734(n)) = 2n.
A126760(a(A007310(n))) = A277911(n).
For n > 1, A055396(a(n)) = A055396(n) - (-1)^A055396(n). [Permutation sends the terms on any odd row of A246278 to the next even row just below, and vice versa.]
A246277(a(n)) = A246277(n). [While keeping them in the same column.]
a(n) = A064989(A064989(a(A003961(A003961(n))))).
(End)

Extensions

More terms from R. J. Mathar, Sep 06 2007
A small omission in the definition corrected by Antti Karttunen, Nov 05 2016

A228879 a(n+2) = 3*a(n), starting 4,7.

Original entry on oeis.org

4, 7, 12, 21, 36, 63, 108, 189, 324, 567, 972, 1701, 2916, 5103, 8748, 15309, 26244, 45927, 78732, 137781, 236196, 413343, 708588, 1240029, 2125764, 3720087, 6377292, 11160261, 19131876, 33480783, 57395628, 100442349, 172186884, 301327047, 516560652
Offset: 0

Views

Author

Richard R. Forberg, Sep 06 2013

Keywords

Comments

Successive terms are the square roots of expressions of prior terms. The same recursive formula (see below) can be applied using any term of A001353 as the initializing value to produce the family of sequences, as given in the array A227418. This sequence uses A001353(2) = 4, and is the third row of that array.
a(4n) are the squares of A008776(n).
Binomial transform of a(n) is A021006.
First differences of a(n) = A083658 (without initial two terms).
2nd differences of a(n) = A068911 (with initial term).
a(n-1) is the number of n-digit base 10 numbers where all the digits are even numbers, and each digit differs by 2 from the previous and the next digit. - Graeme McRae, Jun 09 2014

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0, 3}, {4, 7}, 50] (* Paolo Xausa, Oct 14 2024 *)
  • PARI
    Vec(-(7*x+4)/(3*x^2-1) + O(x^100)) \\ Colin Barker, Jun 09 2014

Formula

a(n) = sqrt(3*a(n-1)^2 + (-3)^(n-1)), a(0) = 4.
This divisibility relation also applies: a(n+3) = a(n+2)*a(n+1)/a(n).
G.f.: -(7*x+4) / (3*x^2-1). - Colin Barker, Jun 09 2014
From Stefano Spezia, Mar 20 2022: (Start)
a(n) = 3^((n-1)/2)*(4*sqrt(3) + 7 + (-1)^n*(4*sqrt(3) - 7))/2.
E.g.f.: 4*cosh(sqrt(3)*x) + 7*sinh(sqrt(3)*x)/sqrt(3). (End)

Extensions

More terms from Colin Barker, Jun 09 2014

A137255 a(n) = 2*a(n-1) + 4*a(n-2) - 6*a(n-3) - 3*a(n-4) for n > 3, with a(0)=1, a(1)=2, a(2)=4, a(3)=8.

Original entry on oeis.org

1, 2, 4, 8, 17, 36, 80, 178, 409, 942, 2212, 5204, 12377, 29472, 70592, 169198, 406801, 978426, 2357092, 5679488, 13696385, 33032892, 79703120, 192321034, 464168041, 1120302822, 2704242244, 6527724428, 15758096777, 38040729336, 91834772480
Offset: 0

Views

Author

Paul Curtz, Mar 11 2008

Keywords

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 40);
    Coefficients(R!( (1-4*x^2-2*x^3)/(1-2*x-4*x^2+6*x^3+3*x^4) )); // G. C. Greubel, Apr 11 2021
    
  • Maple
    a:=proc(n) options operator, arrow: expand((3/8)*3^((1/2)*n)*(1+(-1)^n)+(5/24)*3^((1/2)*n+1/2)*(1-(-1)^n)+(1/8)*(1+sqrt(2))^(n+1)+(1/8)*(1-sqrt(2))^(n+1)) end proc: seq(a(n),n=0..30); # Emeric Deutsch, Mar 31 2008
  • Mathematica
    LinearRecurrence[{2,4,-6,-3},{1,2,4,8},40] (* or *) CoefficientList[ Series[ (1-4 x^2-2 x^3)/(1-2 x-4 x^2+6 x^3+3 x^4),{x,0,40}],x] (* Harvey P. Dale, May 03 2018 *)
  • Sage
    def A137255_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-4*x^2-2*x^3)/(1-2*x-4*x^2+6*x^3+3*x^4) ).list()
    A137255_list(40) # G. C. Greubel, Apr 11 2021

Formula

a(n) = (3/8)*3^(n/2)*(1 + (-1)^n) + (5/24)*3^((n+1)/2)*(1 - (-1)^n) + (1/8)*(1+sqrt(2))^(n+1) + (1/8)*(1-sqrt(2))^(n+1). - Emeric Deutsch, Mar 31 2008
G.f.: (1 - 4*x^2 - 2*x^3)/(( 1 -3*x^2) *(1 -2*x -x^2)). - Harvey P. Dale, May 03 2018
4*a(n) = A078057(n) + A083658(n+2). - R. J. Mathar, Oct 03 2021

Extensions

More terms from Emeric Deutsch, Mar 31 2008

A360464 a(n) = a(n-1) + a(n-2) - a(n-3) + gcd(a(n-1), a(n-3)), with a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 7, 10, 17, 21, 29, 34, 43, 49, 59, 66, 77, 85, 97, 106, 119, 129, 143, 154, 169, 193, 209, 234, 251, 277, 295, 322, 341, 369, 389, 418, 439, 469, 491, 522, 545, 577, 601, 634, 659, 693, 719, 754, 781, 817, 845, 882, 911, 949, 979, 1018, 1049
Offset: 1

Views

Author

Jack Braxton, Feb 08 2023

Keywords

Comments

All terms beyond a(458) are divisible by 5. - Jack Braxton, Feb 14 2023
From Robert Israel, Feb 15 2023: (Start)
a(n) is divisible by 25 for n >= 8857.
a(n) is divisible by 125 for n >= 8861.
a(n) is divisible by 625 for n >= 8945.
a(n) is divisible by 1875 for n >= 9060.
a(n) is divisible by 5625 for n >= 9064.
Do there exist N > 9064 and m > 5625 such that a(n) is divisible by m for n >= N? If so, N >= 2*10^7. (End)
From Pontus von Brömssen, Feb 17 2023: (Start)
(Answer to the question above.) Yes:
a(n) has an additional factor 5 for n >= 64423404 (so a(n) is divisible by 28125);
a(n) has an additional factor 5 for n >= 64423410;
a(n) has an additional factor 3 for n >= 64424073;
a(n) has an additional factor 21 for n >= 64424144;
a(n) has an additional factor 3 for n >= 64428745;
a(n) has an additional factor 7 for n >= 64428748;
a(n) has an additional factor 3 for n >= 64428756;
a(n) has an additional factor 3 for n >= 64428821;
a(n) has an additional factor 3 for n >= 64514757;
a(n) has an additional factor 5 for n >= 64514783;
a(n) has an additional factor 3 for n >= 797299454;
a(n) has an additional factor 3 for n >= 797299480;
a(n) has an additional factor 5 for n >= 797299487;
a(n) has an additional factor 3 for n >= 797299490;
a(n) has an additional factor 5 for n >= 797299652;
a(n) has an additional factor 3 for n >= 797299667;
a(n) has an additional factor 7 for n >= 797299846;
a(n) has an additional factor 3 for n >= 797299933.
The index for which the next additional factor occurs (if it exists) is larger than 2*10^10.
(End)

Examples

			a(5) = 2 + 1 - 1 + gcd(2, 1) = 3.
		

Crossrefs

Programs

  • Maple
    A:= Vector(200):
    A[1]:= 1: A[2]:= 1: A[3]:= 1:
    for n from 4 to 200 do
      A[n]:= A[n-1] + A[n-2] - A[n-3] + igcd(A[n-1],A[n-3])
    od:
    convert(A,list); # Robert Israel, Feb 15 2023
  • Mathematica
    a[1] = a[2] = a[3] = 1; a[n_] := a[n] = a[n-1] + a[n-2] - a[n-3] + GCD[a[n-1], a[n-3]]; Array[a, 100] (* Amiram Eldar, Feb 08 2023 *)
  • Python
    from math import gcd
    a = [0, 1, 1, 1]
    [a.append(a[n-1]+a[n-2]-a[n-3]+gcd(a[n-1], a[n-3])) for n in range(4, 58)]
    print(a[1:]) # Michael S. Branicky, Feb 09 2023

Formula

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

A370202 a(n) = a(n-3) + a(n-2) + gcd(a(n-2), a(n-1)) with a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 7, 17, 15, 25, 37, 41, 63, 79, 105, 143, 185, 249, 329, 435, 579, 767, 1015, 1347, 1783, 2363, 3131, 4147, 5495, 7279, 9643, 12775, 16923, 22419, 29701, 39343, 52121, 69045, 91465, 121171, 160511, 212637, 281683, 373149, 494321, 654833, 867471
Offset: 1

Views

Author

Eli Jaffe, Feb 11 2024

Keywords

Comments

The ratio between consecutive terms (a(n)/a(n-1)) appears to approach the plastic constant A060006.

Crossrefs

Programs

  • Python
    from math import gcd
    def terms(n):
      nums = [1,1,1]
      for i in range(n-3):
        new_num = nums[i] + nums[i+1] + gcd(nums[i+1], nums[i+2])
        nums.append(new_num)
      return nums
Showing 1-7 of 7 results.