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 21-30 of 56 results. Next

A226200 a(n) = 6^n + n.

Original entry on oeis.org

1, 7, 38, 219, 1300, 7781, 46662, 279943, 1679624, 10077705, 60466186, 362797067, 2176782348, 13060694029, 78364164110, 470184984591, 2821109907472, 16926659444753, 101559956668434, 609359740010515, 3656158440062996, 21936950640377877, 131621703842267158, 789730223053602839
Offset: 0

Views

Author

Vincenzo Librandi, Jun 16 2013

Keywords

Comments

After 7, the next prime of this form has 238 digits (see A058828). - Bruno Berselli, Jun 18 2013

Crossrefs

Cf. numbers of the form k^n + n: A006127 (k=2), A104743 (k=3), A158879 (k=4), A104745 (k=5), this sequence (k=6), A226199 (k=7), A226201 (k=8), A226202 (k=9), A081552 (k=10), A226737 (k=11).
Cf. A058828, A199320 (first differences).

Programs

  • Magma
    [6^n+n: n in [0..30]];
    
  • Magma
    I:=[1, 7, 38]; [n le 3 select I[n] else 8*Self(n-1)-13*Self(n-2)+6*Self(n-3): n in [1..30]];
    
  • Mathematica
    Table[6^n + n, {n, 0, 30}] (* or *) CoefficientList[Series[(-1 + x + 5 x^2) / ((6 x - 1) (x - 1)^2), {x, 0, 30}], x]
  • PARI
    a(n)=6^n+n \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (-1+x+5*x^2)/((6*x-1)*(x-1)^2).
a(n) = 8*a(n-1) - 13*a(n-2) + 6*a(n-3).
E.g.f.: exp(x)*(exp(5*x) + x). - Elmo R. Oliveira, Mar 05 2025

A226737 a(n) = 11^n + n.

Original entry on oeis.org

1, 12, 123, 1334, 14645, 161056, 1771567, 19487178, 214358889, 2357947700, 25937424611, 285311670622, 3138428376733, 34522712143944, 379749833583255, 4177248169415666, 45949729863572177, 505447028499293788, 5559917313492231499, 61159090448414546310, 672749994932560009221
Offset: 0

Views

Author

Vincenzo Librandi, Jun 16 2013

Keywords

Crossrefs

Cf. numbers of the form k^n + n: A006127 (k=2), A104743 (k=3), A158879 (k=4), A104745 (k=5), A226200 (k=6), A226199 (k=7), A226201 (k=8), A226202 (k=9), A081552 (k=10), this sequence (k=11).
Cf. A199764 (first differences).

Programs

  • Magma
    [11^n+n: n in [0..30]];
    
  • Magma
    I:=[1, 12, 123]; [n le 3 select I[n] else 13*Self(n-1)-23*Self(n-2)+11*Self(n-3): n in [1..30]];
    
  • Mathematica
    Table[11^n + n, {n, 0, 30}] (* or *) CoefficientList[Series[(- 1 + x + 10 x^2) / ((11 x - 1) (x - 1)^2), {x, 0, 30}], x]
    LinearRecurrence[{13,-23,11},{1,12,123},20] (* Harvey P. Dale, Nov 14 2018 *)
  • PARI
    a(n)=11^n+n \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f.: (-1+x+10*x^2)/((11*x-1)*(x-1)^2).
a(n) = 13*a(n-1) - 23*a(n-2) + 11*a(n-3).
E.g.f.: exp(x)*(exp(10*x) + x). - Elmo R. Oliveira, Mar 06 2025

A247248 a(n) is the least k such that n divides 2^k + k.

Original entry on oeis.org

1, 2, 1, 4, 4, 2, 6, 8, 7, 4, 3, 8, 12, 6, 7, 16, 16, 14, 18, 4, 19, 8, 22, 8, 33, 12, 7, 40, 11, 26, 23, 32, 8, 16, 6, 32, 5, 18, 37, 24, 40, 38, 42, 8, 7, 22, 10, 32, 61, 84, 38, 12, 35, 32, 46, 40, 32, 28, 24, 44, 17, 30, 61, 64, 66, 8, 66, 16, 67, 6, 11, 32
Offset: 1

Views

Author

Michel Lagneau, Dec 01 2014

Keywords

Comments

For every positive integer n, there exists an integer k such that 2^k + k is divisible by n. The proof is given in the link, p. 63.

Examples

			a(7) = 6 because 2^6 + 6 = 70 is divisible by 7.
		

Crossrefs

Cf. A135366, A006127 (2^n+n).

Programs

  • Maple
    f:= proc(n) local k;
    for k from 1 do
      if 2^k + k mod n = 0 then return k fi
    od
    end proc:
    seq(f(n), n=1..100); # Robert Israel, Dec 01 2014
  • Mathematica
    Table[s=0; k=0; While[k++; s=Mod[2^k+k, n]; s>0]; k, {n, 50}]
    lk[n_]:=Module[{k=1},While[Mod[2^k+k,n]!=0,k++];k]; Array[lk,120] (* Harvey P. Dale, Jun 18 2022 *)
  • PARI
    a(n) = for(m=1, oo, if(Mod(2, n)^m==-m, return(m))); \\ Jinyuan Wang, Mar 15 2020
  • Python
    def A247248(n):
        if n == 1:
            return 1
        else:
            x, k, kr = 1,0,0
            while (x+kr) % n:
                x, kr = (2*x) % n, (kr+1) % n
                k += 1
            return k
    # Chai Wah Wu, Dec 03 2014
    

A057663 Primes p such that p + 2^p is also a prime.

Original entry on oeis.org

3, 5, 89, 317, 701
Offset: 1

Views

Author

Labos Elemer, Oct 16 2000

Keywords

Comments

Different from A056206, where, e.g., at n=89, 89 is not minimal, A056206(89)=29 and not 89.
a(6) > 27479. - Ralf Stephan, Oct 23 2002
Intersection of A000040 and A052007. - Iain Fox, Nov 08 2017
a(6) > 678561. - Iain Fox, Nov 08 2017
Every term other than 3 is congruent to 5 (mod 6). - Arkadiusz Wesolowski, Nov 14 2017
These terms satisfy phi(k + 2^k) = phi(k) + 2^k, where phi is A000010, the Euler totient function. Conjecture: this sequence gives all numbers k that satisfy the condition phi(k + 2^k) = phi(k) + 2^k. - Juri-Stepan Gerasimov, May 23 2019

Examples

			q=3, 2^3 + 3 = 11 a prime.
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(1000) | IsPrime(2^p+p) ] // Vincenzo Librandi, Aug 07 2010
    
  • Mathematica
    Select[Prime@ Range[10^3], PrimeQ[# + 2^#] &] (* Michael De Vlieger, Nov 08 2017 *)
  • PARI
    lista(nn) = forprime(p=3, nn, if(ispseudoprime(p + 2^p), print1(p, ", "))) \\ Iain Fox, Nov 13 2017
    
  • Sage
    [n for n in (1..1000) if is_prime(n) and is_prime(2^n+n)] # G. C. Greubel, May 24 2019

A132925 a(n) = 2^n - 1 + n*(n-1)/2.

Original entry on oeis.org

1, 4, 10, 21, 41, 78, 148, 283, 547, 1068, 2102, 4161, 8269, 16474, 32872, 65655, 131207, 262296, 524458, 1048765, 2097361, 4194534, 8388860, 16777491, 33554731, 67109188, 134218078, 268435833, 536871317, 1073742258, 2147484112
Offset: 1

Views

Author

Gary W. Adamson, Sep 05 2007

Keywords

Comments

Row sums of triangle A132924. n-th Mersenne number + (n-1)-th triangular number.
Partial sums of A006127. - Jaroslav Krizek, Oct 16 2009

Examples

			a(4) = 21 = sum of row 4 terms of triangle A132924: (4 + 4 + 5 + 8).
a(4) = 21 = (1, 3, 3, 1) dot (1, 3, 3, 2) = (1 + 9 + 9 + 2).
		

Crossrefs

Programs

Formula

Binomial transform of [1, 3, 3, 2, 2, 2, 2, ...].
a(n) = A000225(n) + A000217(n-1). - Jaroslav Krizek, Oct 16 2009
From Harvey P. Dale, Jun 19 2011: (Start)
a(n) = 5*a(n-1) - 9*a(n-2) + 7*a(n-3) - 2*a(n-4); a(1)=1, a(2)=4, a(3)=10, a(4)=21.
G.f.: -x*(x^2+x-1)/((x-1)^3*(2*x-1)). (End)
E.g.f.: exp(x)*(2*exp(x) + x^2 - 2)/2. - Stefano Spezia, Feb 01 2025

A188915 Union of squares and powers of 2.

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 16, 25, 32, 36, 49, 64, 81, 100, 121, 128, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600, 1681, 1764, 1849, 1936, 2025, 2048, 2116, 2209, 2304, 2401, 2500, 2601, 2704, 2809, 2916
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 14 2011

Keywords

Comments

A188916 and A188917 give positions where squares and powers of 2 occur:
n^2: a(A188916(n)) = A000290(n);
2^n: a(A188917(n)) = A000079(n);
4^n: a(A006127(n)) = A000302(n), A006127 is the intersection of A188916 and A188917.

Crossrefs

Union of A000290 and A000079.
Disjoint union of A000290 and A004171.

Programs

  • Haskell
    import Data.List.Ordered (union)
    a188915 n = a188915_list !! n
    a188915_list = union a000290_list a000079_list
    -- Reinhard Zumkeller, May 19 2015, Apr 14 2011
    
  • Mathematica
    seq[lim_] := Union[2^Range[1, Floor[Log2[lim]], 2], Range[0, Floor[Sqrt[lim]]]^2]; seq[3000] (* Amiram Eldar, Apr 13 2025 *)
  • Python
    from math import isqrt
    def A188915(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return n+x-isqrt(x)-((m:=x.bit_length()-1)>>1)-(m&1)
        return bisection(f,n-1,n**2) # Chai Wah Wu, Sep 19 2024

Formula

A010052(a(n)) + A209229(a(n)) > 0. - Reinhard Zumkeller, May 19 2015
Sum_{n>=1} 1/a(n) = Pi^2/6 + 2/3. - Amiram Eldar, Apr 13 2025

A371928 T(n,k) is the total number of levels in all Dyck paths of semilength n containing exactly k path nodes; triangle T(n,k), n>=0, 1<=k<=n+1, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 3, 5, 6, 1, 8, 15, 13, 11, 1, 23, 44, 43, 29, 20, 1, 71, 134, 138, 106, 62, 37, 1, 229, 427, 446, 371, 248, 132, 70, 1, 759, 1408, 1478, 1275, 941, 571, 283, 135, 1, 2566, 4753, 5017, 4410, 3437, 2331, 1310, 611, 264, 1, 8817, 16321, 17339, 15458, 12426, 9027, 5709, 3002, 1324, 521, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 14 2024

Keywords

Comments

A Dyck path of semilength n has 2n+1 = A005408(n) nodes.

Examples

			In the A000108(3) = 5 Dyck paths of semilength 3 there are 3 levels with 1 node, 5 levels with 2 nodes, 6 levels with 3 nodes, and 1 level with 4 nodes.
  1
  2   /\      2           1           1
  2  /  \     3  /\/\     3  /\       3    /\     3
  2 /    \    2 /    \    3 /  \/\    3 /\/  \    4 /\/\/\    .
  So row 3 is [3, 5, 6, 1].
Triangle T(n,k) begins:
     1;
     1,     1;
     1,     3,     1;
     3,     5,     6,     1;
     8,    15,    13,    11,     1;
    23,    44,    43,    29,    20,    1;
    71,   134,   138,   106,    62,   37,    1;
   229,   427,   446,   371,   248,  132,   70,    1;
   759,  1408,  1478,  1275,   941,  571,  283,  135,    1;
  2566,  4753,  5017,  4410,  3437, 2331, 1310,  611,  264,   1;
  8817, 16321, 17339, 15458, 12426, 9027, 5709, 3002, 1324, 521, 1;
  ...
		

Crossrefs

Columns k=1-2 give: A152880, A371903.
Row sums give A261003.
T(n+1,n+1) gives A006127.

Programs

  • Maple
    g:= proc(x, y, p) (h-> `if`(x=0, add(z^coeff(h, z, i)
              , i=0..degree(h)), b(x, y, h)))(p+z^y) end:
    b:= proc(x, y, p) option remember; `if`(y+2<=x,
          g(x-1, y+1, p), 0)+`if`(y>0, g(x-1, y-1, p), 0)
        end:
    T:= n-> (p-> seq(coeff(p, z, i), i=1..n+1))(g(2*n, 0$2)):
    seq(T(n), n=0..10);

Formula

Sum_{k=1..n+1} k * T(n,k) = A001700(n) = A005408(n) * A000108(n).

A085745 Numbers m such that 2^m + m is a semiprime.

Original entry on oeis.org

2, 11, 23, 34, 59, 69, 87, 95, 119, 123, 129, 171, 197, 239, 341, 425, 455, 471, 515, 519, 635, 765, 959, 1115, 1181, 1210
Offset: 1

Views

Author

Jason Earls, Jul 21 2003

Keywords

Comments

a(27) >= 1239. If 1239 is not a term then a(27) = 1275. - Amiram Eldar, Oct 26 2024

Crossrefs

Sequences A165767, A165768, A165769 are the analog for 2^n-n. - M. F. Hasler, Oct 08 2009

Programs

  • Mathematica
    Select[Range[1300],PrimeOmega[2^#+#]==2&] (* Harvey P. Dale, Dec 18 2014 *)

Formula

a(n) = 2*k <=> A089535(n) is even <=> A089536(n) = 2 <=> A089537(n) = 4^k/2 + k, and for any prime of this form, there is a term a(n) = 2*k in this sequence. - M. F. Hasler, Oct 08 2009

Extensions

More terms from Ray Chandler, Nov 08 2003
a(15) from Donovan Johnson, Mar 06 2008
a(16)-a(26) from Sean A. Irvine, Oct 27 2009
Offset changed to 1 by Jinyuan Wang, Jul 30 2021

A089535 Semiprimes of the form 2^k + k.

Original entry on oeis.org

6, 2059, 8388631, 17179869218, 576460752303423547, 590295810358705651781, 154742504910672534362390615, 39614081257132168796771975263, 664613997892457936451903530140172407, 10633823966279326983230456482242756731, 680564733841876926926749214863536423041
Offset: 1

Views

Author

Ray Chandler, Nov 08 2003

Keywords

Crossrefs

Intersection of A001358 and A006127.
Cf. A085745, A089536, A089537, 129962.

Programs

  • Mathematica
    Select[Table[2^k+k,{k,200}],PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 11 2024 *)

Formula

a(n) = 2^A085745(n) + A085745(n).

Extensions

a(10)-a(11) from Jinyuan Wang, Jul 30 2021

A188916 Where squares occur in the union of squares and powers of 2.

Original entry on oeis.org

0, 1, 3, 5, 6, 7, 9, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 14 2011

Keywords

Crossrefs

Cf. A188915, A188917, A010052, A006127 (subsequence).

Programs

Formula

A188915(a(n)) = A000290(n); A188915(A188917(n)) = A000079(n).
Previous Showing 21-30 of 56 results. Next