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

A253145 Triangular numbers (A000217) omitting the term 1.

Original entry on oeis.org

0, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171, 190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435, 465, 496, 528, 561, 595, 630, 666, 703, 741, 780, 820, 861, 903, 946, 990, 1035, 1081, 1128, 1176, 1225, 1275
Offset: 0

Views

Author

Paul Curtz, Mar 23 2015

Keywords

Comments

The full triangle of the inverse Akiyama-Tanigawa transform applied to (-1)^n*A062510(n)=3*(-1)^n*A001045(n) yielding a(n) is
0, 3, 6, 10, 15, 21, 28, 36, ...
-3, -6, -12, -20, -30, -42, -56, ... essentially -A002378
3, 12, 24, 40, 60, 84, ... essentially A046092
-9, -24, -48, -80, -120, ... essentially -A033996
15, 48, 96, 160, ...
-33, -96, -192, ...
63, 192, ...
-129, ...
etc.
First column: (-1)^n*A062510(n).
The following columns are multiples of A122803(n)=(-2)^n. See A007283(n), A091629(n), A020714(n+1), A110286, A175805(n), 4*A005010(n).
An autosequence of the first kind is a sequence whose main diagonal is A000004 = 0's.
b(n) = 0, 0 followed by a(n) is an autosequence of the first kind.
The successive differences of b(n) are
0, 0, 0, 3, 6, 10, 15, 21, ...
0, 0, 3, 3, 4, 5, 6, 7, ... see A194880(n)
0, 3, 0, 1, 1, 1, 1, 1, ...
3, -3, 1, 0, 0, 0, 0, 0, ...
-6, 4, -1, 0, 0, 0, 0, 0, ...
10, -5, 1, 0, 0, 0, 0, 0, ...
-15, 6, -1, 0, 0, 0, 0, 0, ...
21, -7, 1, 0, 0, 0, 0, 0, ...
The inverse binomial transform (first column) is the signed sequence. This is general.
Also generalized hexagonal numbers without 1. - Omar E. Pol, Mar 23 2015

Crossrefs

Programs

Formula

Inverse Akiyama-Tanigawa transform of (-1)^n*A062510(n).
a(n) = (n+1)*(n+2)/2 for n > 0. - Charles R Greathouse IV, Mar 23 2015
a(n+1) = 3*A001840(n+1) + A022003(n).
a(n) = A161680(n+2) for n >= 1. - Georg Fischer, Oct 30 2018
From Stefano Spezia, May 28 2025: (Start)
G.f.: x*(3 - 3*x + x^2)/(1 - x)^3.
E.g.f.: exp(x)*(2 + 4*x + x^2)/2 - 1. (End)

A321483 a(n) = 7*2^n + (-1)^n.

Original entry on oeis.org

8, 13, 29, 55, 113, 223, 449, 895, 1793, 3583, 7169, 14335, 28673, 57343, 114689, 229375, 458753, 917503, 1835009, 3670015, 7340033, 14680063, 29360129, 58720255, 117440513, 234881023, 469762049, 939524095, 1879048193, 3758096383, 7516192769, 15032385535
Offset: 0

Views

Author

Paul Curtz, Nov 11 2018

Keywords

Comments

Difference table:
8, 13, 29, 55, 113, 223, 449, ...
5, 16, 26, 58, 110, 226, 446, 898, ...
11, 10, 32, 52, 116, 220, 452, 892, 1796, ...
-1, 22, 20, 64, 104, 232, 440, 904, 1784, 3592, ...
-2, 44, 40, 128, 208, 464, 880, 1808, 3568, 7184, ...
etc.
Every diagonal is a sequence of the form k*2^m.
a(n) is divisible by
. 5 if n is a term of A004767,
. 11 if n is a term of A016885,
. 13 if n is a term of A017533.

Crossrefs

Programs

  • Mathematica
    a[n_] := 7*2^n + (-1)^n ; Array[a, 32, 0] (* Amiram Eldar, Nov 12 2018 *)
    CoefficientList[Series[E^-x + 7 E^(2 x), {x, 0, 20}], x]*Table[n!, {n, 0, 20}] (* Stefano Spezia, Nov 12 2018 *)
    LinearRecurrence[{1,2},{8,13},40] (* Harvey P. Dale, Mar 18 2022 *)
  • PARI
    Vec((8 + 5*x) / ((1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Nov 11 2018

Formula

O.g.f.: (8 + 5*x) / ((1 + x)*(1 - 2*x)). - Colin Barker, Nov 11 2018
E.g.f.: exp(-x) + 7*exp(2*x). - Stefano Spezia, Nov 12 2018
a(n) = a(n-1) + 2*a(n-2).
a(n) = 2*a(n-1) + 3*(-1)^n for n>0, a(0)=8.
a(2*k) = 7*4^k + 1, a(2*k+1) = 14*4^k - 1.
a(n) = A014551(n) + A014551(n-1) + A014551(n-2).
a(n) = 2^(n+3) - 3*A001045(n).
a(n) mod 9 = A070366(n+3).
a(n) + a(n+1) = 21*2^n.

Extensions

Two terms corrected, and more terms added by Colin Barker, Nov 11 2018

A159256 a(0)=131; for n > 0, a(n) = a(n-1) + floor(sqrt(a(n-1))).

Original entry on oeis.org

131, 142, 153, 165, 177, 190, 203, 217, 231, 246, 261, 277, 293, 310, 327, 345, 363, 382, 401, 421, 441, 462, 483, 504, 526, 548, 571, 594, 618, 642, 667, 692, 718, 744, 771, 798, 826, 854, 883, 912, 942, 972, 1003, 1034, 1066, 1098, 1131, 1164, 1198
Offset: 0

Views

Author

Philippe Deléham, Apr 07 2009

Keywords

Comments

Row 10 in square array A159016. This sequence contains infinitely many squares.
The squares in the sequence are (A175805(k))^2, k=0,1,2,3,... - Vincenzo Librandi, Dec 05 2010

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[0]==131,a[n]==a[n-1]+Floor[Sqrt[a[n-1]]]},a,{n,50}] (* Harvey P. Dale, Apr 17 2013 *)
    NestList[#+Floor[Sqrt[#]]&,131,50] (* Harvey P. Dale, May 11 2019 *)

A140950 a(n) = A140944(n+1) - 3*A140944(n).

Original entry on oeis.org

1, -3, -1, 5, -6, 3, -11, 10, -12, -5, 21, -22, 20, -24, 11, -43, 42, -44, 40, -48, -21, 85, -86, 84, -88, 80, -96, 43, -171, 170, -172, 168, -176, 160, -192, -85, 341, -342, 340, -344, 336, -352, 320, -384, 171, -683, 682, -684, 680, -688
Offset: 0

Views

Author

Paul Curtz, Jul 25 2008

Keywords

Comments

Jacobsthal numbers appear twice: 1) A001045(n+2) signed, terms 0, 1, 3, 6, 10 (A000217); 2) A001045(n+1) signed, terms 0, 2, 5, 9 (n*(n+3)/2=A000096); between them are -3; 5, -6; -11, 10, -12; which appear (opposite sign) by rows in A140503 (1, -1, 2, 3, -2, 4) square.
Consider the permutation of the nonnegative numbers
0, 2, 5, 9, 14, 20, 27,
1, 3, 6, 10, 15, 21, 28,
4, 7, 11, 16, 22, 29,
8, 12, 17, 23, 30,
13, 18, 24, 31,
19, 25, 32,
26, 33,
34, etc.
The corresponding distribution of a(n) is
1, -1, 3, -5, 11, -21, 43,
-3, 5, -11, 21, -43, 85, -171,
-6, 10, -22, 42, -86, 170,
-12, 20, -44, 84, -172,
-24, 40, -88, 168,
-48, 80, -176,
-96, 160,
-192, etc.
Column sums: -2, -2, -10, -10, -42, -42, -170, ... duplicate of a bisection of -A078008(n+2).
b(n)= 1, -1, 3, -5, 11, 21, ... = (-1)^n*A001045(n+1) = A077925(n). Every row is b(n) or b(n+2) multiplied by 1, -1, -2, -4, -8, -16, ..., essentially -A011782(n).

Crossrefs

Programs

  • Mathematica
    T[0, 0] = 0; T[1, 0] = T[0, 1] = 1; T[0, n_] := T[0, n] = T[0, n - 1] + 2*T[0, n - 2]; T[d_, d_] = 0; T[d_, n_] := T[d, n] = T[d - 1, n + 1] - T[d - 1, n]; A140944 = Table[T[d, n], {d, 0, 10}, {n, 0, d}] // Flatten; a[n_] := A140944[[n + 2]] - 3*A140944[[n + 1]]; Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Dec 18 2014 *)

Extensions

More terms and a(19)=-48 instead of 42 corrected by Jean-François Alcover, Dec 22 2014

A322417 a(n) - 2*a(n-1) = period 2: repeat [3, 0] for n > 0, a(0)=5, a(1)=13.

Original entry on oeis.org

5, 13, 26, 55, 110, 223, 446, 895, 1790, 3583, 7166, 14335, 28670, 57343, 114686, 229375, 458750, 917503, 1835006, 3670015, 7340030, 14680063, 29360126, 58720255, 117440510, 234881023, 469762046, 939524095, 1879048190, 3758096383, 7516192766
Offset: 0

Views

Author

Paul Curtz, Dec 07 2018

Keywords

Comments

a(n) mod 9 = period 6: repeat [5, 4, 8, 1, 2, 7]. See A177883(n+2).
a(n+1) mod 10 = period 4: repeat [3, 6, 5, 0].

Crossrefs

Programs

  • GAP
    a:=[13,26];; for n in [3..30] do a[n]:=a[n-2]+21*2^(n-2); od; Concatenation([5],a); # Muniru A Asiru, Dec 07 2018
    
  • Mathematica
    a[0] = 5; a[1] = 13; a[n_] := a[n] = a[n - 2] + 21*2^(n - 2); Array[a, 30, 0] (* Amiram Eldar, Dec 07 2018 *)
    LinearRecurrence[{2, 1, -2}, {5, 13, 26}, 31] (* Jean-François Alcover, Jan 28 2019 *)
  • PARI
    Vec((5 + 3*x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)) + O(x^40)) \\ Colin Barker, Dec 07 2018

Formula

a(n) = A166920(n) + A166920(n+1) + A166920(n+2) for n >= 2.
a(n) = a(n-2) + 21*2^(n-2) for n >= 2.
a(n) = a(n-1) + A321483(n) for n > 0.
From Colin Barker, Dec 07 2018: (Start)
G.f.: (5 + 3*x - 5*x^2) / ((1 - x)*(1 + x)*(1 - 2*x)).
a(n) = 7*2^n - 2 for n even.
a(n) = 7*2^n - 1 for n odd.
a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3) for n > 2.
(End)
a(2*n+1) = A206372(n). a(2*n+2) = 2*A206372(n) for n > 0.

Extensions

First formula corrected by Jean-François Alcover, Feb 01 2019

A320227 Assuming the truth of the Collatz conjecture, let T(n,i), i = 1..k be the initial k elements of the Collatz trajectory of n, up to when the first 1 appears, but excluding the 1. a(n) is the number of ordered pairs T(n,i) < T(n,j) such that gcd(T(n,i), T(n,j)) = 1.

Original entry on oeis.org

0, 0, 10, 0, 4, 11, 58, 0, 84, 4, 40, 12, 12, 62, 47, 0, 25, 89, 89, 4, 6, 43, 36, 13, 117, 13, 3395, 66, 66, 49, 3064, 0, 148, 27, 21, 94, 94, 94, 286, 4, 3246, 6, 184, 46, 42, 39, 2924, 14, 122, 122, 120, 14, 14, 3435, 3374, 70, 231, 70, 247, 51, 63, 3101
Offset: 1

Views

Author

Michel Lagneau, Oct 08 2018

Keywords

Comments

If the number 1 of the Collatz trajectory is included, we obtain the new sequence b(n) = a(n) + A006577(n).
We observe interesting properties for the even and odd values of a(n).
First case: a(n) = 0, 4, 6, ..., 2i, ...
When a(n) = q even, there exists a subset N(q) = {n_1, n_2, ...} such that a(n_i) = q for i = 1, 2, ... We observe that N(q) = N1(q) union N2(q) (see the table below). Conjecturally, for n = 12, 14, 16, ... N1(q) is finite and the last two elements of the set N1(q) are of the form x and x+1.
The elements of N2(q) are of the form {((4^m - 1)/3)*2^k}, k = 0, 1, ... with m = a(n)/2. The set N2(q) is infinite.
Second case: a(n) = 11, 13, 15, ...
Conjecturally, N1(q) is finite and the last two elements of the set N1(q) are of the form y and y+2.
Conjecture: N2(q) = { }.
The following table gives the first 17 values of a(n) in ascending order with the corresponding subsets N1(q) and N2(q).
+----+--------------------------------------------------------------------+
|a(n)| N1(a(n)) |
+----+--------------------------------------------------------------------+
| 0 |{ } |
| 4 |{ } |
| 6 |{ } |
| 8 |{ } |
| 10 |{3} |
| 11 |{6} |
| 12 |{12, 13} |
| 13 |{24, 26} |
| 14 |{48, 52, 53} |
| 15 |{96, 104, 106} |
| 16 |{192, 208, 212, 213} |
| 17 |{384, 416, 424, 426} |
| 18 |{768, 832, 848, 852, 853} |
| 19 |{113, 1536, 1664, 1696, 1704, 706} |
| 20 |{226, 3072, 3328, 3392, 3408, 3412, 3413} |
| 21 |{35, 452, 453, 6144, 6656, 6784, 6816, 6824, 6826} |
| 22 |{70, 227, 904, 906, 12288, 13312, 13568, 13632, 13648, 13652, 13653}|
+----+--------------------------------------------------------------------+
+----+--------------------------------------------------------------------+
|a(n)| N2(a(n)) |
+----+--------------------------------------------------------------------+
| 0 |{1, 2, 4, 8, 16, 32, ..., 2^k, ... } (A000079) |
| 4 |{5, 10, 20, 40, 80, ..., 5*2^k, ...} (A020714) |
| 6 |{21, 42, 84, 168, 336, 672, ..., ((4^3 - 1)/3)*2^k, ...} (A175805) |
| 8 |{85, 170, 340, 680, ..., ((4^4 - 1)/3)*2^k, ...} |
| 10 |{341, 682, 1364, 2728, ..., ((4^5 - 1)/3)*2^k, ...} |
| 11 | { } |
| 12 |{1365, 2730, 5460, ...,((4^6 - 1)/3)*2^k, ...} |
| 13 | { } |
| 14 |{5461, 10922, ..., ((4^7 - 1)/3)*2^k, ...} |
| 15 | { } |
| 16 |{21845, 43690, ...,((4^8 - 1)/3)*2^k, ...} |
| 17 | { } |
| 18 |{87381, 174762, ...,((4^9 - 1)/3)*2^k, ...} |
| 19 | { } |
| 20 |{349525, 699050, ..., ((4^10 - 1)/3)*2^k, ...} |
| 21 | { } |
| 22 |{1398101, 2796202, ..., ((4^11 - 1)/3)*2^k, ...} |
+----+--------------------------------------------------------------------+

Examples

			a(3) = 10 because the Collatz trajectory T(3,i) of 3 up to the number 1 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2  and gcd(T(i), T(j)) = 1 for the 10 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 8) and (5, 16). 28
In the general case, a(n) = 10 for n in the set {3} union {341, 682, 1364, 2728, ...,((4^5 - 1)/3)*2^k, ...} with k = 0, 1, 2, ...
a(6) = 11 because the Collatz trajectory T(6,i) of 6 up to the number 1 is 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2  and gcd(T(i), T(j)) = 1 for the 11 following pairs of elements of T: (2, 3), (2, 5), (3, 4), (3, 5), (3, 8), (3, 10), (3, 16), (4, 5), (5, 6), (5, 8) and (5, 16).
		

Crossrefs

Programs

  • Maple
    nn:=1000:
    for n from 1 to 200 do:
       m:=n:lst:={}:
          for i from 1 to nn while(m<>1) do:
            if irem(m, 2)=0
             then
             lst:=lst union {m}:m:=m/2:
             else
             lst:=lst union {m}:m:=3*m+1:
           fi:
         od:
        n0:=nops(lst):it:=0:
         for j from 1 to n0-1 do:
          for k from j+1 to n0 do:
           if gcd(lst[j],lst[k])=1
           then
            it:=it+1:
            else fi:
        od:
        od:
      printf(`%d, `,it):
    od:

Extensions

Definition revised by N. J. A. Sloane, Nov 12 2018

A323097 Numbers m such that all elements of the Collatz trajectory occur in the divisors of m.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 80, 128, 160, 256, 320, 512, 640, 1024, 1280, 1344, 2048, 2560, 2688, 4096, 5120, 5376, 8192, 10240, 10752, 16384, 20480, 21504, 21760, 32768, 40960, 43008, 43520, 65536, 81920, 86016, 87040, 131072, 163840, 172032, 174080, 262144, 327680
Offset: 1

Views

Author

Michel Lagneau, Aug 30 2019

Keywords

Comments

See A207674 (numbers such that all divisors occur in their Collatz trajectories).
The powers of 2 are in the sequence.
The number 80 is probably the unique non-power of 2 of the sequence such that the elements of the Collatz trajectory are exactly the same as the divisors.
The numbers 5*2^k (A020714) for k > 3 are in the sequence.
The numbers 21*2^k (A175805) for k > 5 are in the sequence.
The numbers 85*2^k for k > 7 are in the sequence.
In the general case, the numbers of the form ((4^i - 1)/3)*2^j for i = 1, 2,... and j = 2i, 2i+1, 2i+2, ... are in the sequence.

Examples

			1344 is in the sequence because the set of the divisors {1, 2, 3, 4, 6, 7, 8, 12, 14, 16, 21, 24, 28, 32, 42, 48, 56, 64, 84, 96, 112, 168, 192, 224, 336, 448, 672, 1344} contains the set of the elements of the Collatz trajectory 1344 -> 672 -> 336 -> 168 -> 84 -> 42 -> 21 -> 64 -> 32 -> 16 -> 8 -> 4 -> 2 -> 1
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=250000:
      for n from 1 to nn do:
        m:=n:it:=0:lst:={n}:
          for i from 1 to nn while(m<>1) do:
            if irem(m, 2)=0
             then
             m:=m/2:
             else
             m:=3*m+1:
            fi:
           it:=it+1:lst:=lst union {m}:
          od:
           x:=divisors(n):n0:=nops(x):lst1:={op(x), x[n0]}:
           lst2:=lst intersect lst1:n1:=nops(lst2):
           if lst2=lst
           then
           printf(`%d, `,n):
           else fi:
         od:
  • Mathematica
    aQ[n_] := n == LCM @@ NestWhileList[If[OddQ[#], 3 # + 1, #/2] &, n, # > 1 &]; Select[Range[330000], aQ] (* Amiram Eldar, Aug 31 2019 *)

A334423 Fixed points of A257345.

Original entry on oeis.org

0, 1, 2, 4, 8, 16, 21, 32, 42, 64, 84, 128, 168, 256, 336, 512, 672, 1024, 1344, 2048, 2231, 2688, 4096, 4462, 5376, 8192, 9324, 10752, 16384, 18648, 21504, 32768, 37296, 43008, 65536, 74592, 86016, 131072, 149184, 172032, 262144, 298368, 344064, 524288, 596736, 688128, 1048576
Offset: 1

Views

Author

Bernard Schott, May 25 2020

Keywords

Comments

The least positive multiple of an integer m that when written in base 10 uses only 0's and 1's is q = A004290(m) = k*m. If we regard q as binary number and converts q to base 10, we get A257345(q) = u. When m = u, then m is a term.
If m is a term, then m*2^k is another term.
The first 3 primitive terms are 1, 21, 2231 and the 3 corresponding subsequences of such fixed points are,
-> m = 0 or m = 2^k, k>=0 (A131577),
-> m = 21 * 2^k, k>=0 (A175805),
-> m = 2231 * 2^k, k>=0 (2231, 4462, 9324, 18648, ...).

Examples

			The least positive multiple of 42 that when written in base 10 uses only 0's and 1's is 101010 = 2405*42. If we regard 101010 as binary number and converts to base 10, we get 42; hence, 42 is a term.
Successive operations for first primitive terms:
1 --> A004290(1) = 1_{10} --> 1_{2} = 1_{10},
21 --> A004290(21) = 10101_{10} --> 10101_{2} = 21_{10},
2231 --> A004290(2231) = 100010110111_{10} --> 100010110111_{2} = 2231_{10}.
		

Crossrefs

Subsequences: A131577, A175805.

Programs

  • PARI
    f(n) = {if( n==0, return (0)); my(m = n); while (vecmax(digits(m)) != 1, m+=n); m; } \\ A004290
    isok(m) = fromdigits(digits(f(m), 10), 2) == m; \\ Michel Marcus, May 29 2020

Formula

A257345(A004290(a(n))) = a(n).

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.
Previous Showing 11-19 of 19 results.