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.

A024037 a(n) = 4^n - n.

Original entry on oeis.org

1, 3, 14, 61, 252, 1019, 4090, 16377, 65528, 262135, 1048566, 4194293, 16777204, 67108851, 268435442, 1073741809, 4294967280, 17179869167, 68719476718, 274877906925, 1099511627756, 4398046511083, 17592186044394, 70368744177641, 281474976710632, 1125899906842599
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. numbers of the form k^n - n: A000325 (k=2), A024024 (k=3), this sequence (k=4), A024050 (k=5), A024063 (k=6), A024076 (k=7), A024089 (k=8), A024102 (k=9), A024115 (k=10), A024128 (k=11), A024141 (k=12).
Cf. A140660 (first differences).

Programs

  • Magma
    [4^n - n: n in [0..35]]; // Vincenzo Librandi, May 13 2011
    
  • Magma
    I:=[1, 3, 14]; [n le 3 select I[n] else 6*Self(n-1)-9*Self(n-2)+4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 16 2013
    
  • Mathematica
    Table[4^n - n, {n, 0, 30}] (* or *) CoefficientList[Series[(1 - 3 x + 5 x^2) / ((1 - 4 x) (1 - x)^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 16 2013 *)
  • PARI
    a(n)=4^n-n \\ Charles R Greathouse IV, Sep 24 2015

Formula

From Vincenzo Librandi, Jun 16 2013: (Start)
G.f.: (1 - 3*x + 5*x^2)/((1 - 4*x)*(1 - x)^2).
a(n) = 6*a(n-1) - 9*a(n-2) + 4*a(n-3). (End)
E.g.f.: exp(x)*(exp(3*x) - x). - Elmo R. Oliveira, Sep 10 2024

A164346 a(n) = 3 * 4^n.

Original entry on oeis.org

3, 12, 48, 192, 768, 3072, 12288, 49152, 196608, 786432, 3145728, 12582912, 50331648, 201326592, 805306368, 3221225472, 12884901888, 51539607552, 206158430208, 824633720832, 3298534883328, 13194139533312, 52776558133248, 211106232532992, 844424930131968
Offset: 0

Views

Author

Klaus Brockhaus, Aug 13 2009

Keywords

Comments

Binomial transform of A000244 without initial 1.
Second binomial transform of A007283.
Third binomial transform of A010701.
Inverse binomial transform of A005053 without initial 1.
First differences of A024036. - Omar E. Pol, Feb 16 2013

Crossrefs

Cf. A000302 (powers of 4), A000244 (powers of 3), A007283 (3*2^n), A010701 (all 3's), A005053, A002001, A096045, A140660 (3*4^n+1), A002023 (6*4^n), A002063(9*4^n), A056120, A084509.

Programs

Formula

a(n) = 4*a(n-1) for n > 1; a(0) = 3.
G.f.: 3/(1-4*x).
a(n) = A002001(n+1). a(n) = A096045(n)+2. a(n) = A140660(n)-1.
a(n) = A002023(n)/2. a(n) = A002063(n)/3. a(n) = A056120(n+3)/9.
Apparently a(n) = A084509(n+3)/2.
a(n) = A110594(n+1), n>1. - R. J. Mathar, Aug 17 2009
a(n) = 3*A000302(n). - Omar E. Pol, Feb 18 2013
a(n) = A000079(2*n) + A000079(2*n+1). - M. F. Hasler, Jul 28 2015
E.g.f.: 3*exp(4*x). - G. C. Greubel, Sep 15 2017

A136412 a(n) = (5*4^n + 1)/3.

Original entry on oeis.org

2, 7, 27, 107, 427, 1707, 6827, 27307, 109227, 436907, 1747627, 6990507, 27962027, 111848107, 447392427, 1789569707, 7158278827, 28633115307, 114532461227, 458129844907, 1832519379627, 7330077518507, 29320310074027
Offset: 0

Views

Author

Paul Curtz, Mar 31 2008

Keywords

Comments

An Engel expansion of 4/5 to the base b := 4/3 as defined in A181565, with the associated series expansion 4/5 = b/2 + b^2/(2*7) + b^3/(2*7*27) + b^4/(2*7*27*107) + .... Cf. A199115 and A140660. - Peter Bala, Oct 29 2013

Crossrefs

Sequences of the form (m*4^n + 1)/3: A007583 (m=2), this sequence (m=5), A199210 (m=11), A199210 (m=11), A206373 (m=14).

Programs

Formula

a(n) = 4*a(n-1) - 1.
a(n) = A199115(n)/3.
O.g.f.: (2-3*x)/((1-x)*(1-4*x)). - R. J. Mathar, Apr 04 2008
a(n) = 5*a(n-1) - 4*a(n-2). - Vincenzo Librandi, Nov 04 2011
E.g.f.: (1/3)*(5*exp(4*x) + exp(x)). - G. C. Greubel, Jan 19 2023

Extensions

Formula in definition and more terms from R. J. Mathar, Apr 04 2008

A140683 a(n) = 3*(-1)^(n+1)*2^n - 1.

Original entry on oeis.org

-4, 5, -13, 23, -49, 95, -193, 383, -769, 1535, -3073, 6143, -12289, 24575, -49153, 98303, -196609, 393215, -786433, 1572863, -3145729, 6291455, -12582913, 25165823, -50331649, 100663295, -201326593, 402653183, -805306369, 1610612735, -3221225473
Offset: 0

Views

Author

Paul Curtz, Jul 11 2008

Keywords

Comments

Alternated reading of negative of A140660 and A140529.
The binomial transform yields -4 followed by the negative of A140657.
The inverse binomial transform yields essentially a signed version of A000244. - R. J. Mathar, Aug 02 2008

Programs

  • Magma
    [3*(-1)^(n+1)*2^n-1: n in [0..40]]; // Vincenzo Librandi, Aug 08 2011
  • Mathematica
    Table[3(-1)^(n+1)2^n-1,{n,0,40}] (* or *) LinearRecurrence[{-1,2},{-4,5},40] (* Harvey P. Dale, May 26 2011 *)

Formula

a(2n) = -A140660(n). a(2n+1) = A140529(n).
a(n+1) - a(n) = (-1)^n*A005010(n). a(2n) + a(2n+1) = A096045(n).
a(n) = A140590(n+1) - 2*A140590(n).
O.g.f: (4-x)/((x-1)(2x+1)). - R. J. Mathar, Aug 02 2008
a(n) = -a(n-1) + 2*a(n-2); a(0)=-4, a(1)=5. - Harvey P. Dale, May 26 2011

Extensions

Edited and extended by R. J. Mathar, Aug 02 2008

A199115 a(n) = 5*4^n+1.

Original entry on oeis.org

6, 21, 81, 321, 1281, 5121, 20481, 81921, 327681, 1310721, 5242881, 20971521, 83886081, 335544321, 1342177281, 5368709121, 21474836481, 85899345921, 343597383681, 1374389534721, 5497558138881, 21990232555521, 87960930222081
Offset: 0

Views

Author

Vincenzo Librandi, Nov 04 2011

Keywords

Comments

An Engel expansion of 4/5 to the base 4 as defined in A181565, with the associated series expansion 4/5 = 4/6 + 4^2/(6*21) + 4^3/(6*21*81) + 4^4/(6*21*81*321) + ... . Cf. A136412 and A140660. - Peter Bala, Oct 29 2013

Crossrefs

Programs

  • Magma
    [5*4^n+1: n in [0..30]];
  • Mathematica
    5*4^Range[0,30]+1 (* or  *) LinearRecurrence[{5,-4},{6,21},30] (* Harvey P. Dale, Oct 19 2024 *)

Formula

a(n) = 3*A136412(n).
a(n) = 4*a(n-1)-3.
a(n) = 5*a(n-1)-4*a(n-2).
G.f.: 3*(2-3*x)/((1-x)*(1-4*x)). - Bruno Berselli, Nov 04 2011

A140788 a(n) = 6*4^n + 2.

Original entry on oeis.org

8, 26, 98, 386, 1538, 6146, 24578, 98306, 393218, 1572866, 6291458, 25165826, 100663298, 402653186, 1610612738, 6442450946, 25769803778, 103079215106, 412316860418, 1649267441666, 6597069766658, 26388279066626, 105553116266498, 422212465065986, 1688849860263938
Offset: 0

Views

Author

Paul Curtz, Jul 14 2008

Keywords

Crossrefs

Cf. A140660.

Programs

  • Magma
    [6*4^n+2: n in [0..30]]; // Vincenzo Librandi, Aug 08 2011
  • Mathematica
    6*4^Range[0,30]+2 (* or *) LinearRecurrence[{5,-4},{8,26},30] (* Harvey P. Dale, Apr 15 2019 *)

Formula

a(n) = 2*A140660(n).
From R. J. Mathar, Feb 07 2009: (Start)
a(n) = 5*a(n-1) - 4*a(n-2).
G.f.: 2*(4-7*x)/((1-x)*(1-4*x)). (End)
E.g.f.: 2*exp(x)*(3*exp(3*x) + 1). - Elmo R. Oliveira, Apr 02 2025

Extensions

More terms from R. J. Mathar, Feb 07 2009

A197918 Pythagorean primes p such that for all primes q < p, p XOR q is not equal to p - q.

Original entry on oeis.org

2, 5, 17, 41, 73, 97, 137, 193, 257, 521, 577, 641, 1033, 1153, 2081, 2113, 4129, 7681, 8353, 8737, 9281, 10369, 10753, 12289, 16417, 17921, 18433, 21569, 25601, 32801, 32833, 36353, 37889, 38921, 39041, 40961, 50177, 53377, 65537, 131617, 133121, 136193, 139273, 139297, 139393, 147457, 163841
Offset: 1

Views

Author

Brad Clardy, Oct 24 2011

Keywords

Comments

It is conjectured that with the exception of the first three terms (2,5,17) all of the terms are a subset of all primes p such that p XOR 22 = p + 22.
If the inequality in the definition is replaced with equality the result are the Mersenne primes A000668, which is equivalent to for all primes q

This sequence is apparently a subset of A081091 Primes of the form 2^i + 2^j + 1, i>j>0, with the added conditions that j <> 1 or 2, and if j can be written as 2n then i cannot be 2n+1. This removes A123250 Primes of form 2^n + 5 (or 2^n + 2^2 +1) for n>0, primes from A140660 3*4^n + 1 (or 2^(2n+1) + 2^(2n) + 1) for n>0, and A057733 Primes of form 2^n + 3 (2^n + 2^1 + 1) for n>1.

Examples

			5 is a Pythagorean prime (1^2 + 2^2) and a member since ((5 XOR 2) <> (5 - 2)) and ((5 XOR 3) <> (5 - 3)).
13 is a Pythagorean prime (2^2 + 3^2) however it is not a member because 5, a prime less than 13, (13 XOR 5) = (13 - 5).
		

Programs

  • Magma
    XOR := func;
    i:=0; k:=0; pn:=0;
    for n:= 5 to 10000 by 4 do
           if IsPrime(n)  then  pn:=n;  end if;
           if (pn eq n) then k:=0;
               for j in [2 .. n-2] do
                    if IsPrime(j)  then pj:=j;
                         if (XOR(pn,pj) ne pn-pj) then i+:=1;
                             else k+:=1;
                         end if;
                    end if;
               end for;
           end if;
           if ((i ne 0) and (k eq 0))  then pn; end if;
           i:=0; k:=0;
    end for;
    
  • PARI
    forprime(p=2,1e6,if(p%4-3==0,next);forprime(q=2,p-1,if(bitxor(p,q)==p-q, next(2)));print1(p", ")) \\ Charles R Greathouse IV, Jul 31 2012
Showing 1-7 of 7 results.