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-10 of 29 results. Next

A057732 Numbers k such that 2^k + 3 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 12, 15, 16, 18, 28, 30, 55, 67, 84, 228, 390, 784, 1110, 1704, 2008, 2139, 2191, 2367, 2370, 4002, 4060, 4062, 4552, 5547, 8739, 17187, 17220, 17934, 20724, 22732, 25927, 31854, 33028, 35754, 38244, 39796, 40347, 55456, 58312, 122550, 205962, 235326, 363120, 479844, 685578, 742452, 1213815, 1434400, 1594947, 1875552, 1940812, 2205444
Offset: 1

Views

Author

G. L. Honaker, Jr., Oct 29 2000

Keywords

Comments

Some of the larger entries may only correspond to probable primes.
A number k is in this sequence iff A062709(k) is in A057733; this is the case iff A257273(k) is in A125246. - M. F. Hasler, Apr 27 2015

Examples

			For k = 6, 2^6 + 3 = 67 is prime.
For k = 28, 2^28 + 3 = 268435459 is prime.
		

References

  • Mike Oakes, posting to primenumbers(AT)yahoogroups.com on Jul 08 2001

Crossrefs

Cf. A019434 (primes 2^k+1), this sequence (2^k+3), A059242 (2^k+5), A057195 (2^k+7), A057196(2^k+9), A102633 (2^k+11), A102634 (2^k+13), A057197 (2^k+15), A057200 (2^k+17), A057221 (2^k+19), A057201 (2^k+21), A057203 (2^k+23).

Programs

  • Magma
    [n: n in [0..1000] | IsPrime(2^n+3)]; // Vincenzo Librandi, Apr 27 2015
  • Mathematica
    Select[Range[10000], PrimeQ[2^# + 3] &] (* Vincenzo Librandi, Apr 27 2015 *)
  • PARI
    for(n=1, 2200, if(isprime(2^n+3), print1(n, ", ")));
    
  • PARI
    for (n=1, 2, if (isprime(2^n+3), print1(n, ", "))); for(n=3, 100000, N=2^n+3 ; S=(N-5)/2 ; x=S ; for(j=1, n-1, x=Mod(x^2-2, N)) ; if(x==S , print1(n, ", "))) \\ produces terms corresponding to probable primes, see formula; Tony Reix, Aug 27 2015
    

Formula

Here is an LLT-like algorithm, using a cycle of the digraph x^2-2 modulo N, that finds terms of this sequence generating a PRP (PRobable Prime) of A057733 numbers: N=2^k+3; S0=(N-5)/2; s(0)=S0; s(i+1)=s(i)^2-2 modulo N; if s(k-1) == S0 then N is prime. - Tony Reix, Aug 27 2015

Extensions

More terms from Jason Earls, Jul 18 2001 and Mike Oakes, Jul 28 2001
a(47)-a(50) from Donovan Johnson 2006, verified by Paul Bourdelais, Mar 22 2012
a(51) is a probable prime based on trial factoring to 1E9 and PRP testing base 3,5,7 (PFGW v3.3.1). Discovered by Paul Bourdelais, Apr 09 2012
a(52)-a(54) from Paul Bourdelais, Jun 18 2019
a(55) from Paul Bourdelais, Jul 16 2019
a(56) from Paul Bourdelais, Apr 22 2020
a(57) from Paul Bourdelais, Jun 12 2020
a(58) from Paul Bourdelais, Aug 04 2020

A264977 a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 7, 8, 5, 2, 7, 12, 1, 14, 15, 16, 13, 10, 7, 4, 5, 14, 11, 24, 13, 2, 15, 28, 1, 30, 31, 32, 29, 26, 7, 20, 13, 14, 3, 8, 1, 10, 11, 28, 5, 22, 19, 48, 21, 26, 15, 4, 13, 30, 19, 56, 29, 2, 31, 60, 1, 62, 63, 64, 61, 58, 7, 52, 29, 14, 19, 40, 25, 26, 3, 28, 13, 6, 11, 16, 9, 2, 11, 20, 1, 22
Offset: 0

Views

Author

Antti Karttunen, Dec 10 2015

Keywords

Comments

a(n) is the n-th Stern polynomial (cf. A260443, A125184) evaluated at X = 2 over the field GF(2).
For n >= 1, a(n) gives the index of the row where n occurs in array A277710.

Examples

			In this example, binary numbers are given zero-padded to four bits.
a(2) = 2a(1) = 2 * 1 = 2.
a(3) = a(1) XOR a(2) = 1 XOR 2 = 0001 XOR 0010 = 0011 = 3.
a(4) = 2a(2) = 2 * 2 = 4.
a(5) = a(2) XOR a(3) = 2 XOR 3 = 0010 XOR 0011 = 0001 = 1.
a(6) = 2a(3) = 2 * 3 = 6.
a(7) = a(3) XOR a(4) = 3 XOR 4 = 0011 XOR 0100 = 0111 = 7.
		

Crossrefs

Cf. A023758 (the fixed points).
Cf. also A068156, A168081, A265407.
Cf. A277700 (binary weight of terms).
Cf. A277701, A277712, A277713 (positions of 1's, 2's and 3's in this sequence).
Cf. A277711 (position of the first occurrence of each n in this sequence).
Cf. also arrays A277710, A099884.

Programs

  • Mathematica
    recurXOR[0] = 0; recurXOR[1] = 1; recurXOR[n_] := recurXOR[n] = If[EvenQ[n], 2recurXOR[n/2], BitXor[recurXOR[(n - 1)/2 + 1], recurXOR[(n - 1)/2]]]; Table[recurXOR[n], {n, 0, 100}] (* Jean-François Alcover, Oct 23 2016 *)
  • Python
    class Memoize:
        def _init_(self, func):
            self.func=func
            self.cache={}
        def _call_(self, arg):
            if arg not in self.cache:
                self.cache[arg] = self.func(arg)
            return self.cache[arg]
    @Memoize
    def a(n): return n if n<2 else 2*a(n//2) if n%2==0 else a((n - 1)//2)^a((n + 1)//2)
    print([a(n) for n in range(51)]) # Indranil Ghosh, Jul 27 2017

Formula

a(0) = 0, a(1) = 1, a(2*n) = 2*a(n), a(2*n+1) = a(n) XOR a(n+1).
a(n) = A248663(A260443(n)).
a(n) = A048675(A277330(n)). - Antti Karttunen, Oct 27 2016
Other identities. For all n >= 0:
a(n) = n - A265397(n).
From Antti Karttunen, Oct 28 2016: (Start)
A000035(a(n)) = A000035(n). [Preserves the parity of n.]
A010873(a(n)) = A010873(n). [a(n) mod 4 = n mod 4.]
A001511(a(n)) = A001511(n) = A055396(A277330(n)). [In general, the 2-adic valuation of n is preserved.]
A010060(a(n)) = A011655(n).
a(n) <= n.
For n >= 2, a((2^n)+1) = (2^n) - 3.
The following two identities are so far unproved:
For n >= 2, a(3*A000225(n)) = a(A068156(n)) = 5.
For n >= 2, a(A068156(n)-2) = A062709(n) = 2^n + 3.
(End)

A254364 a(n) = 3*4^n + 10*2^n + 6*3^n + 5^n + 15.

Original entry on oeis.org

35, 70, 182, 574, 2054, 7990, 32942, 141694, 629174, 2862790, 13275902, 62494414, 297701894, 1431677590, 6937683662, 33825224734, 165731728214, 815255212390, 4023182840222, 19905098860654, 98686897716134, 490094080827190, 2437150677449582, 12132600130570174, 60450764450513654
Offset: 0

Views

Author

Luciano Ancora, Jan 29 2015

Keywords

Comments

This is the sequence of fifth terms of "third partial sums of m-th powers".

Crossrefs

Programs

  • Mathematica
    Table[3 4^n + 10 2^n + 6 3^n + 5^n + 15, {n, 0, 30}] (* Bruno Berselli, Jan 30 2015 *)
    LinearRecurrence[{15,-85,225,-274,120},{35,70,182,574,2054},30] (* Harvey P. Dale, Aug 11 2016 *)
  • PARI
    vector(30, n, n--; 3*4^n + 10*2^n + 6*3^n + 5^n + 15) \\ Colin Barker, Jan 30 2015

Formula

From Colin Barker, Jan 30 2015: (Start)
G.f.: -(2754*x^4 - 4081*x^3 + 2107*x^2 - 455*x + 35)/((x-1)*(2*x-1)*(3*x-1)*(4*x-1)*(5*x-1)).
a(n) = 15*a(n-1) - 85*a(n-2) + 225*a(n-3) - 274*a(n-4) + 120*a(n-5). (End)
E.g.f.: exp(x)*(exp(4*x) + 3*exp(3*x) + 6*exp(2*x) + 10*exp(x) + 15). - Elmo R. Oliveira, Sep 16 2024

A131426 a(n) = 2*prime(n) - 3.

Original entry on oeis.org

1, 3, 7, 11, 19, 23, 31, 35, 43, 55, 59, 71, 79, 83, 91, 103, 115, 119, 131, 139, 143, 155, 163, 175, 191, 199, 203, 211, 215, 223, 251, 259, 271, 275, 295, 299, 311, 323, 331, 343, 355, 359, 379, 383, 391, 395, 419, 443, 451, 455, 463, 475, 479, 499, 511, 523, 535, 539, 551, 559, 563, 583, 611
Offset: 1

Views

Author

Gary W. Adamson, Jul 10 2007

Keywords

Comments

Right border of triangle A131424.

Examples

			a(4) = 11 = 2*p(4) - 3 = 2*7 - 3.
		

Crossrefs

Programs

Formula

a(n) = 2*A000040(n) - 3.

A116623 a(0)=1, a(2n) = a(n)+A000079(A000523(2n)), a(2n+1) = 3*a(n) + A000079(A000523(2n+1)+1).

Original entry on oeis.org

1, 5, 7, 19, 11, 29, 23, 65, 19, 49, 37, 103, 31, 85, 73, 211, 35, 89, 65, 179, 53, 143, 119, 341, 47, 125, 101, 287, 89, 251, 227, 665, 67, 169, 121, 331, 97, 259, 211, 601, 85, 223, 175, 493, 151, 421, 373, 1087, 79, 205, 157, 439, 133, 367, 319, 925, 121
Offset: 0

Views

Author

Antti Karttunen, Feb 20 2006. Proposed by Pierre Lamothe (plamothe(AT)aei.ca), May 21 2004

Keywords

Comments

Viewed as a binary tree, this is (1); 5; 7,19; 11,29,23,65; ... Related to the parity vectors of Collatz and Terras trajectories.

Crossrefs

Cf. a(n) = A116640(A059893(n)). a(A000225(n)) = A001047(n+1). For n>= 1 a(A000079(n)) = A062709(n+1). A116641 gives the terms in ascending order and without duplicates.

Programs

  • Maple
    A116623 := proc(n)
        option remember;
        if n = 0 then
            1;
        elif type(n,'even') then
            procname(n/2)+2^A000523(n) ;
        else
            3*procname(floor(n/2))+2^(1+A000523(n)) ;
        end if;
    end proc: # R. J. Mathar, Nov 28 2016
  • Mathematica
    a[n_] := a[n] = Which[n == 0, 1, EvenQ[n], a[n/2] + 2^Floor@Log2[n], True, 3a[Floor[n/2]] + 2^(1 + Floor@Log2[n])];
    Table[a[n], {n, 0, 56}] (* Jean-François Alcover, Sep 01 2023 *)

A116640 a(n) = A116623(A059893(n)).

Original entry on oeis.org

1, 5, 7, 19, 11, 23, 29, 65, 19, 31, 37, 73, 49, 85, 103, 211, 35, 47, 53, 89, 65, 101, 119, 227, 89, 125, 143, 251, 179, 287, 341, 665, 67, 79, 85, 121, 97, 133, 151, 259, 121, 157, 175, 283, 211, 319, 373, 697, 169, 205, 223, 331, 259, 367, 421, 745, 331
Offset: 0

Views

Author

Antti Karttunen, Feb 20 2006. Proposed by Pierre Lamothe (plamothe(AT)aei.ca), May 21 2004

Keywords

Comments

Viewed as a binary tree, this is (1); 5; 7,19; 11,23,29,65; ... Cf. A116623.
If we treat (2n+1) as a binary number with the nonzero bits numbered (highest bit first) from 0..k and the regular binary place value of each nonzero bit numbered from b(0) to b(k) then a(n) = 3^0 * b(0) + 3^1 * b(1) + .. + 3^k. For instance, if n=6 then 2n+1 = 13, which is equal to 8+4+1 or 1101 base(2); and a(n)=29 which is 8*1 + 4*3 + 1*9. - Joe Slater, Jan 23 2016

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; piecewise(
        n mod 4 = 0, 3*procname(n/2) - 2*procname(n/4),
      n mod 4 = 1, 6*procname((n-1)/4) - procname((n-1)/2),
      n mod 4 = 2, procname(n/2) + 2*procname((n-2)/4),
      5*procname((n-1)/2) - 6*procname((n-3)/4))
    end proc:
    a(0):= 1:
    map(a, [$0..100]); # Robert Israel, Jan 19 2016
  • Mathematica
    a[n_] := a[n] = Switch[Mod[n, 4], 0, 3a[Floor[n/2]] - 2a[Floor[n/4]], 1, 6a[Floor[n/4]] - a[Floor[n/2]], 2, a[Floor[n/2]] + 2a[Floor[n/4]], 3, 5a[Floor[n/2]] - 6a[Floor[n/4]]]; a[0]=1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 28 2016 *)
  • PARI
    a(n) = if(n==0, return(1)); 2*a(n\2) - (-1)^n * 3^hammingweight(n) \\ Charles R Greathouse IV, Jan 21 2016
    
  • PARI
    a(n) = my(p=2*n+1,v=vecextract(vector(#binary(p),j,2^(j-1)),p));sum(i=0,#v-1,3^i*v[#v-i]) \\ Joe Slater, May 09 2017

Formula

a(A000225(n)) = A001047(n+1).
For n>= 1 a(A000079(n)) = A062709(n+1).
From Joe Slater, Jan 19 2016: (Start)
a(0) = 1,
a(n) = 3*a(floor(n/2)) - 2*a(floor(n/4)) for n=0 (mod 4) and n>0,
a(n) = 6*a(floor(n/4)) - a(floor(n/2)) for n=1 (mod 4),
a(n) = a(floor(n/2)) + 2*a(floor(n/4)) for n=2 (mod 4),
a(n) = 5*a(floor(n/2)) - 6*a(floor(n/4)) for n=3 (mod 4)
(End)
a(0) = 1, a(n) = 2*a(floor(n/2)) - A033999(n) * A048883(n) for n>0. -
Joe Slater, Jan 22 2016

A173921 Sums of rows of the triangle in A173920.

Original entry on oeis.org

0, 1, 1, 4, 2, 5, 6, 12, 4, 7, 9, 14, 12, 19, 21, 32, 8, 11, 17, 22, 19, 27, 30, 40, 24, 35, 37, 52, 41, 57, 60, 80, 16, 19, 33, 38, 34, 41, 51, 60, 40, 51, 57, 70, 64, 81, 85, 104, 48, 67, 69, 92, 76, 99, 101, 128, 84, 111, 113, 144, 118, 151, 155, 192, 32, 35, 65, 70, 66, 73
Offset: 0

Views

Author

Reinhard Zumkeller, Mar 04 2010

Keywords

Comments

a(n) = SUM(A173920(n,k): 0<=k<=n);
a(A000225(n)) = A001787(n);
a(A000079(n)) = A011782(n);
a(A000051(n)) = A062709(n) for n>0;
A000120(n)<=a(n)<=A000788(n); a(n)=A000788(n) iff n=2^k-1.

Crossrefs

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

Original entry on oeis.org

2, 5, 14, 44, 152, 560, 2144, 8384, 33152, 131840, 525824, 2100224, 8394752, 33566720, 134242304, 536920064, 2147581952, 8590131200, 34360131584, 137439739904, 549757386752, 2199026401280, 8796099313664, 35184384671744, 140737513521152, 562950003752960, 2251799914348544, 9007199456067584
Offset: 0

Views

Author

M. F. Hasler, Apr 27 2015

Keywords

Comments

a(n) is in A125246 <=> n is in A057732 <=> A062709(n) is in A057733.
These are also the row sum of the triangle A146769: For n>=1, a(n-1) is the sum of row n of A146769.

Crossrefs

Programs

  • Magma
    [2^(n-1)*(2^n+3): n in [0..35]]; // Vincenzo Librandi, Apr 27 2015
    
  • Mathematica
    Table[2^(n - 1) (2^n + 3), {n, 0, 30}] (* Bruno Berselli, Apr 27 2015 *)
    CoefficientList[Series[(2 - 7 x)/((1 - 4 x) (1 - 2 x)), {x, 0, 30}], x] (* Vincenzo Librandi, Apr 27 2015 *)
    LinearRecurrence[{6,-8},{2,5},30] (* Harvey P. Dale, Dec 21 2024 *)
  • PARI
    a(n)=2^(n-1)*(2^n+3)
    
  • PARI
    Vec((2-7*x)/((1-4*x)*(1-2*x)) + O(x^100)) \\ Colin Barker, Apr 27 2015

Formula

G.f.: (2-7*x)/((1-4*x)*(1-2*x)). - Vincenzo Librandi, Apr 27 2015
a(n) = 6*a(n-1)-8*a(n-2). - Colin Barker, Apr 27 2015

A194455 a(n) = 2^n + 3n + 1.

Original entry on oeis.org

2, 6, 11, 18, 29, 48, 83, 150, 281, 540, 1055, 2082, 4133, 8232, 16427, 32814, 65585, 131124, 262199, 524346, 1048637, 2097216, 4194371, 8388678, 16777289, 33554508, 67108943, 134217810, 268435541, 536871000, 1073741915, 2147483742, 4294967393, 8589934692, 17179869287
Offset: 0

Views

Author

Bruno Berselli, Sep 01 2011

Keywords

Comments

Inverse binomial transform of this sequence: 2,4,1,1 (1 continued).

Crossrefs

Cf. A062709 (first differences), A000079 (second and successive differences).
Cf. A146529 (differences between alternate terms, for n>2).

Programs

  • Magma
    [2^n+3*n+1: n in [0..31]];
    
  • Mathematica
    Table[2^n + 3 n + 1, {n, 0, 40}] (* Vincenzo Librandi, Mar 26 2013 *)
    LinearRecurrence[{4,-5,2},{2,6,11},40] (* Harvey P. Dale, Oct 01 2014 *)
  • PARI
    for(n=0, 31, print1(2^n+3*n+1", "));

Formula

G.f.: (2 - 2*x - 3*x^2)/((1 - 2*x)*(1 - x)^2).
a(n) = A086653(n) - 1 for n > 0.
Sum_{i=0..n} a(i) = A115067(n+1) + 2^(n+1).
a(n) = 3*a(n-1) - 2*a(n-2) - 3 for n > 1.
a(n)^2 = 2^(n+1)*(a(n-1) + 3) + (3*n + 1)^2 for n > 2.
E.g.f.: exp(x)*(1 + exp(x) + 3*x). - Stefano Spezia, May 06 2023

A254362 a(n) = 3*2^n + 3^n + 6.

Original entry on oeis.org

10, 15, 27, 57, 135, 345, 927, 2577, 7335, 21225, 62127, 183297, 543735, 1618905, 4832127, 14447217, 43243335, 129533385, 388206927, 1163834337, 3489930135, 10466644665, 31393642527, 94168344657, 282479868135, 847389272745, 2542067154927, 7626000138177
Offset: 0

Views

Author

Luciano Ancora, Jan 29 2015

Keywords

Comments

This is the sequence of third terms of "third partial sums of m-th powers".
Is this 10 followed by A087719? [Bruno Berselli, Jan 30 2015]

Crossrefs

Programs

  • Mathematica
    Table[3 * 2^n + 3^n + 6, {n, 0, 29}] (* Alonso del Arte, Jan 29 2015 *)
    LinearRecurrence[{6,-11,6},{10,15,27},30] (* Harvey P. Dale, Oct 11 2024 *)
  • PARI
    vector(30, n, n--; 3*2^n + 3^n + 6) \\ Colin Barker, Jan 30 2015

Formula

G.f.: -(47*x^2-45*x+10) / ((x-1)*(2*x-1)*(3*x-1)). - Colin Barker, Jan 30 2015
a(n) = 6*a(n-1) -11*a(n-2) +6*a(n-3). - Colin Barker, Jan 30 2015
Showing 1-10 of 29 results. Next