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-20 of 37 results. Next

A050232 a(n) is the number of n-tosses having a run of 4 or more heads for a fair coin (i.e., probability is a(n)/2^n).

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 20, 48, 111, 251, 558, 1224, 2656, 5713, 12199, 25888, 54648, 114832, 240335, 501239, 1042126, 2160676, 4468664, 9221281, 18989899, 39034824, 80103276, 164126496, 335808927, 686182387, 1400438814, 2854992080, 5814293120, 11829648225, 24046855887, 48840756608
Offset: 1

Views

Author

Keywords

Comments

a(n-1) is the number of compositions of n with at least one part >= 5. - Joerg Arndt, Aug 06 2012

References

  • W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.

Crossrefs

Column 5 of A109435.

Programs

  • Magma
    R:= PowerSeriesRing(Integers(), 50);
    [0,0,0] cat Coefficients(R!( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) )); // G. C. Greubel, Jun 01 2025
    
  • Mathematica
    Flatten[With[{tetrnos=LinearRecurrence[{1,1,1,1},{0,1,1,2},50]}, Table[ 2^n- Take[tetrnos,{n+3}],{n,40}]]] (* Harvey P. Dale, Dec 02 2011 *)
    LinearRecurrence[{3,-1,-1,-1,-2}, {0,0,0,1,3}, 31] (* Ray Chandler, Aug 03 2015 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; -2,-1,-1,-1,3]^(n-1)*[0;0;0;1;3])[1,1] \\ Charles R Greathouse IV, Feb 09 2017
    
  • Python
    def a(n, adict={0:0, 1:0, 2:0, 3:1, 4:3}):
        if n in adict:
            return adict[n]
        adict[n]=3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - 2*a(n-5)
        return adict[n] # David Nacin, Mar 07 2012
    
  • SageMath
    def A050232_list(prec):
        P.= PowerSeriesRing(QQ, prec)
        return P( x^4/((1-2*x)*(1-x-x^2-x^3-x^4)) ).list()
    a=A050232_list(41); a[1:] # G. C. Greubel, Jun 01 2025

Formula

a(n) = 2^n - tetranacci(n+4), see A000078. - Vladeta Jovovic, Feb 23 2003
G.f.: x^4/((1-2*x)*(1-x-x^2-x^3-x^4)). - Geoffrey Critzer, Jan 29 2009
a(n) = 3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - 2*a(n-5). - Wesley Ivan Hurt, Apr 23 2021

A353401 Number of integer compositions of n with all prime run-lengths.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 4, 3, 6, 9, 10, 18, 27, 35, 54, 83, 107, 176, 242, 354, 515, 774, 1070, 1648, 2332, 3429, 4984, 7326, 10521, 15591, 22517, 32908, 48048, 70044, 101903, 149081, 216973, 316289, 461959, 672664, 981356, 1431256, 2086901, 3041577, 4439226, 6467735
Offset: 0

Views

Author

Gus Wiseman, May 15 2022

Keywords

Examples

			The a(0) = 1 through a(9) = 9 compositions (empty column indicated by dot, 0 is the empty composition):
  0   .  11   111   22   11111   33     11122     44       333
                                 222    22111     1133     11133
                                 1122   1111111   3311     33111
                                 2211             11222    111222
                                                  22211    222111
                                                  112211   1111122
                                                           1112211
                                                           1122111
                                                           2211111
		

Crossrefs

The case of runs equal to 2 is A003242 aerated.
The <= 1 version is A003242 ranked by A333489.
The version for parts instead of run-lengths is A023360, both A353429.
The version for partitions is A055923.
The > 1 version is A114901, ranked by A353427.
The <= 2 version is A128695, matching A335464.
The > 2 version is A353400, partitions A100405.
Words with all distinct run-lengths: A032020, A044813, A098859, A130091, A329739, A351013, A351017.
A005811 counts runs in binary expansion.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A167606 counts compositions with adjacent parts coprime.
A329738 counts uniform compositions, partitions A047966.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(`if`(i<>h, add(
         `if`(isprime(j), b(n-i*j, i), 0), j=2..n/i), 0), i=1..n/2))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[Length/@Split[#],_?(!PrimeQ[#]&)]&]],{n,0,15}]

Extensions

a(21)-a(45) from Alois P. Heinz, May 18 2022

A119706 Total length of longest runs of 1's in all bitstrings of length n.

Original entry on oeis.org

1, 4, 11, 27, 62, 138, 300, 643, 1363, 2866, 5988, 12448, 25770, 53168, 109381, 224481, 459742, 939872, 1918418, 3910398, 7961064, 16190194, 32893738, 66772387, 135437649, 274518868, 556061298, 1125679616, 2277559414, 4605810806, 9309804278, 18809961926
Offset: 1

Views

Author

Adam Kertesz, Jun 09 2006, Jun 13 2006

Keywords

Comments

a(n) divided by 2^n is the expected value of the longest run of heads in n tosses of a fair coin.
a(n) is also the sum of the number of binary words with at least one run of consecutive 0's of length >= i for i>=1. In other words A000225 + A008466 + A050231 + A050232 + ... . - Geoffrey Critzer, Jan 12 2013

Examples

			a(3)=11 because for the 8(2^3) possible runs 0 is longest run of heads once, 1 four times, 2 two times and 3 once and 0*1+1*4+2*2+3*1 = 11.
		

References

  • A. M. Odlyzko, Asymptotic Enumeration Methods, pp. 136-137
  • R. Sedgewick and P. Flajolet, Analysis of Algorithms, Addison Wesley, 1996, page 372.

Crossrefs

Cf. A334833.

Programs

  • Maple
    A038374 := proc(n) local nshft, thisr, resul; nshft := n ; resul :=0 ; thisr :=0 ; while nshft > 0 do if nshft mod 2 <> 0 then thisr := thisr+1 ; else resul := max(resul, thisr) ; thisr := 0 ; fi ; nshft := floor(nshft/2) ; od ; resul := max(resul, thisr) ; RETURN(resul) ; end : A119706 := proc(n) local count, c, rlen ; count := array(0..n) ; for c from 0 to n do count[c] := 0 ; od ; for c from 0 to 2^n-1 do rlen := A038374(c) ; count[rlen] := count[rlen]+1 ; od ; RETURN( sum('count[c]*c','c'=0..n) ); end: for n from 1 to 40 do print(n,A119706(n)) ; od : # R. J. Mathar, Jun 15 2006
    # second Maple program:
    b:= proc(n, m) option remember; `if`(n=0, 1,
          `if`(m=0, add(b(n-j, j), j=1..n),
          add(b(n-j, min(n-j, m)), j=1..min(n, m))))
        end:
    a:= proc(n) option remember;
         `if`(n<2, n, 2*a(n-1) +b(n, 0))
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Dec 19 2014
  • Mathematica
    nn=10;Drop[Apply[Plus,Table[CoefficientList[Series[1/(1-2x)-(1-x^n)/(1-2x+x^(n+1)),{x,0,nn}],x],{n,1,nn}]],1]  (* Geoffrey Critzer, Jan 12 2013 *)

Formula

a(n+1) = 2*a(n) + A007059(n+2)
a(n) > 2*a(n-1). a(n) = Sum_{i=1..(2^n)-1} A038374(i). - R. J. Mathar, Jun 15 2006
From Geoffrey Critzer, Jan 12 2013: (Start)
O.g.f.: Sum_{k>=1} 1/(1-2*x) - (1-x^k)/(1-2*x+x^(k+1)). - Corrected by Steven Finch, May 16 2020
a(n) = Sum_{k=1..n} A048004(n,k) * k.
(End)
Conjecture: a(n) = A102712(n+1)-2^n. - R. J. Mathar, Jun 05 2025

Extensions

More terms from R. J. Mathar, Jun 15 2006
Name edited by Alois P. Heinz, Mar 18 2020

A050233 a(n) is the number of n-tosses having a run of 5 or more heads for a fair coin (i.e., probability is a(n)/2^n).

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 8, 20, 48, 112, 255, 571, 1262, 2760, 5984, 12880, 27553, 58631, 124192, 262008, 550800, 1154256, 2412031, 5027575, 10455246, 21697060, 44940472, 92920992, 191818561, 395386763, 813872712, 1673157228, 3435591712, 7046697888, 14438448127, 29555251315, 60444113566
Offset: 1

Views

Author

Keywords

Comments

a(n-1) is the number of compositions of n with at least one part >= 6. - Joerg Arndt, Aug 06 2012

References

  • W. Feller, An Introduction to Probability Theory and Its Applications, Vol. 1, 2nd ed. New York: Wiley, p. 300, 1968.

Crossrefs

Column 6 of A109435.

Programs

  • Magma
    R:= PowerSeriesRing(Integers(), 50);
    [0,0,0,0] cat Coefficients(R!( x^5/((1-2*x)*(1-x-x^2-x^3-x^4-x^5)) )); // G. C. Greubel, Jun 01 2025
    
  • Mathematica
    f[x_] := x^4 / (1-3x+x^2+x^3+x^4+x^5+2x^6); CoefficientList[ Series[f[x], {x, 0, 31}], x] (* Jean-François Alcover, Nov 18 2011 *)
    LinearRecurrence[{3,-1,-1,-1,-1,-2},{0,0,0,0,1,3},40] (* Harvey P. Dale, Jan 27 2015 *)
  • PARI
    a(n)=([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; -2,-1,-1,-1,-1,3]^(n-1)*[0;0;0;0;1;3])[1,1] \\ Charles R Greathouse IV, Jun 15 2015
    
  • SageMath
    def A050233_list(prec):
        P.= PowerSeriesRing(QQ, prec)
        return P( x^5/((1-2*x)*(1-x-x^2-x^3-x^4-x^5)) ).list()
    a=A050233_list(41); a[1:] # G. C. Greubel, Jun 01 2025

Formula

a(n) = 2^(n+1) - pentanacci(n+6), cf. A001591. - Vladeta Jovovic, Feb 23 2003
G.f.: x^5/((1-2*x)*(1-x-x^2-x^3-x^4-x^5)). - Geoffrey Critzer, Jan 29 2009
a(n) = 3*a(n-1) - a(n-2) - a(n-3) - a(n-4) - a(n-5) - 2*a(n-6). - Wesley Ivan Hurt, Jan 03 2021

A109435 Triangle read by rows: T(n,m) = number of binary numbers n digits long, which have m 0's as a substring.

Original entry on oeis.org

1, 2, 1, 4, 3, 1, 8, 7, 3, 1, 16, 15, 8, 3, 1, 32, 31, 19, 8, 3, 1, 64, 63, 43, 20, 8, 3, 1, 128, 127, 94, 47, 20, 8, 3, 1, 256, 255, 201, 107, 48, 20, 8, 3, 1, 512, 511, 423, 238, 111, 48, 20, 8, 3, 1, 1024, 1023, 880, 520, 251, 112, 48, 20, 8, 3, 1, 2048, 2047, 1815, 1121, 558
Offset: 0

Views

Author

Robert G. Wilson v, Jun 28 2005

Keywords

Comments

Column 0 is A000079, column 2 is A000225, column 3 is A008466, column 4 is A050231
Column 5 is A050232, column 6 is A050233, the last column is A001792.
A050227 with a leading column of powers of 2. - R. J. Mathar, Mar 25 2014

Examples

			Triangle begins:
n\m_0__1__2__3__4__5
0|  1  0  0  0  0  0
1|  2  1  0  0  0  0
2|  4  3  1  0  0  0
3|  8  7  3  1  0  0
4| 16 15  8  3  1  0
5| 32 31 19  8  3  1
T(5,3)=8 because there are 8 length 5 binary words that contain 000 as a contiguous substring:  00000, 00001, 00010, 00011, 01000, 10000, 10001, 11000. - _Geoffrey Critzer_, Jan 07 2014
		

Crossrefs

Cf. A109433, A001792, A109436, A102712 (row sums ?).

Programs

  • Maple
    A109435 := proc(n,k)
        option remember ;
        if n< k then
            0;
        elif n = k then
            1;
        else
            2*procname(n-1,k)+2^(n-1-k)-procname(n-1-k,k) ;
        end if;
    end proc:
    seq(seq( A109435(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Jun 05 2025
  • Mathematica
    T[n_, m_] := Length[ Select[ StringPosition[ #, StringDrop[ ToString[10^m], 1]] & /@ Table[ ToString[ FromDigits[ IntegerDigits[i, 2]]], {i, 2^n, 2^(n + 1) - 1}], # != {} &]]; Flatten[ Table[ T[n, m], {n, 0, 11}, {m, 0, n}]]
    nn=15;Map[Select[#,#>0&]&,Transpose[Table[CoefficientList[Series[x^m/(1-Sum[x^k,{k,1,m}])/(1-2x),{x,0,nn}],x],{m,0,nn}]]]//Grid (* Geoffrey Critzer, Jan 07 2014 *)

Formula

G.f. for column m: x^m/( (1 - Sum_{k=1..m} x^k)*(1-2*x) ). - Geoffrey Critzer, Jan 07 2014

A353428 Number of integer compositions of n with all parts and all run-lengths > 2.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2, 0, 0, 2, 1, 0, 2, 0, 2, 4, 0, 0, 8, 3, 0, 10, 4, 4, 15, 4, 8, 24, 7, 8, 42, 16, 10, 59, 31, 27, 87, 37, 52, 149, 62, 66, 233, 121, 111, 342, 207, 204, 531, 308, 351, 864, 487, 536, 1373, 864, 865, 2057, 1440, 1509, 3232
Offset: 0

Views

Author

Gus Wiseman, May 16 2022

Keywords

Examples

			The a(n) compositions for selected n:
  n=16:   n=18:     n=20:    n=21:      n=24:
----------------------------------------------------
  (4444)  (666)     (5555)   (777)      (888)
          (333333)  (44444)  (333444)   (6666)
                             (444333)   (333555)
                             (3333333)  (444444)
                                        (555333)
                                        (3333444)
                                        (4443333)
                                        (33333333)
		

Crossrefs

Allowing any multiplicities gives A078012, partitions A008483.
The version for no (instead of all) parts or run-lengths > 2 is A137200.
Allowing any parts gives A353400, partitions A100405.
The version for partitions is A353501, ranked by A353502.
The version for > 1 instead of > 2 is A353508, partitions A339222.
A003242 counts anti-run compositions, ranked by A333489.
A008466 counts compositions with some part > 2.
A011782 counts compositions.
A114901 counts compositions with no runs of length 1, ranked by A353427.
A128695 counts compositions with no run-lengths > 2.
A261983 counts non-anti-run compositions.
A335464 counts compositions with a run-length > 2.

Programs

  • Maple
    b:= proc(n, h) option remember; `if`(n=0, 1, add(
         `if`(i=h, 0, add(b(n-i*j, i), j=3..n/i)), i=3..n/3))
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..80);  # Alois P. Heinz, May 18 2022
  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],!MemberQ[#,1|2]&&!MemberQ[Length/@Split[#],1|2]&]],{n,0,15}]

Extensions

a(26)-a(66) from Alois P. Heinz, May 17 2022

A167821 a(n) is the number of n-tosses having a run of 3 or more heads or a run of 3 or more tails for a fair coin (i.e., probability is a(n)/2^n).

Original entry on oeis.org

0, 0, 2, 6, 16, 38, 86, 188, 402, 846, 1760, 3630, 7438, 15164, 30794, 62342, 125904, 253782, 510758, 1026684, 2061730, 4136990, 8295872, 16627166, 33311646, 66716028, 133582106, 267406998, 535206832, 1071049286, 2143127030, 4287918140, 8578528818
Offset: 1

Views

Author

V.J. Pohjola, Nov 13 2009

Keywords

Comments

A167821(n) is the difference between A000918(n), the number of branches of a complete binary tree of n levels, and the number of recursive calls needed to compute the (n+1)-th Fibonacci number F(n+1) as defined in A019274: A167821(n) = A000918(n) - A019274(n+1). - Denis Lorrain, Jan 14 2012
Partial sums of A027934 multiplied term by term by 2 (as shown by the second formula), i.e., partial sums of row sums of A108617. - J. M. Bergot, Oct 02 2012, clarified by R. J. Mathar, Oct 05 2012

Crossrefs

Programs

  • Magma
    [2^n-2*Fibonacci(n+1): n in [1..40]]; // Vincenzo Librandi, Jun 28 2016
  • Mathematica
    CoefficientList[Series[(2 x^2)/(1 - 3 x + x^2 + 2 x^3), {x, 0, 30}], x]
    Table[2^n - 2*Fibonacci[n + 1], {n, 1, 31}]
    LinearRecurrence[{3, -1, -2}, {0, 0, 2}, 50] (* G. C. Greubel, Jun 27 2016 *)

Formula

G.f.: (2 x^2)/(1 - 3 x + x^2 + 2 x^3);
a(n) = 2^n - 2*Fibonacci(n+1).
a(n) = 3*a(n-1) - a(n-2) - 2*a(n-3). - G. C. Greubel, Jun 27 2016

A340156 Square array read by upward antidiagonals: T(n, k) is the number of n-ary strings of length k containing 00.

Original entry on oeis.org

1, 1, 3, 1, 5, 8, 1, 7, 21, 19, 1, 9, 40, 79, 43, 1, 11, 65, 205, 281, 94, 1, 13, 96, 421, 991, 963, 201, 1, 15, 133, 751, 2569, 4612, 3217, 423, 1, 17, 176, 1219, 5531, 15085, 20905, 10547, 880, 1, 19, 225, 1849, 10513, 39186, 86241, 92935, 34089, 1815
Offset: 2

Views

Author

Robert P. P. McKone, Dec 29 2020

Keywords

Examples

			For n = 3 and k = 4, there are 21 strings: {0000, 0001, 0002, 0010, 0011, 0012, 0020, 0021, 0022, 0100, 0200, 1000, 1001, 1002, 1100, 1200, 2000, 2001, 2002, 2100, 2200}.
Square table T(n,k):
     k=2:  k=3:  k=4:   k=5:    k=6:     k=7:
n=2:   1     3     8     19      43       94
n=3:   1     5    21     79     281      963
n=4:   1     7    40    205     991     4612
n=5:   1     9    65    421    2569    15085
n=6:   1    11    96    751    5531    39186
n=7:   1    13   133   1219   10513    87199
n=8:   1    15   176   1849   18271   173608
n=9:   1    17   225   2665   29681   317817
		

Crossrefs

Cf. A008466 (row 2), A186244 (row 3), A000567 (column 4).
Cf. A180165 (not containing 00), A340242 (containing 000).

Programs

  • Mathematica
    m[r_] := Normal[With[{p = 1/n}, SparseArray[{Band[{1, 2}] -> p, {i_, 1} /; i <= r -> 1 - p, {r + 1, r + 1} -> 1}]]];
    T[n_, k_, r_] := MatrixPower[m[r], k][[1, r + 1]]*n^k;
    Reverse[Table[T[n, k - n + 2, 2], {k, 2, 11}, {n, 2, k}], 2] // Flatten (* Robert P. P. McKone, Jan 26 2021 *)

Formula

T(n, k) = n^k - A180165(n+1,k-1), where A180165 in the number of strings not containing 00.
m(2) = [1 - 1/n, 1/n, 0; 1 - 1/n, 0, 1/n; 0, 0, 1], is the probability/transition matrix for two consecutive "0" -> "containing 00".

A353502 Numbers with all prime indices and exponents > 2.

Original entry on oeis.org

1, 125, 343, 625, 1331, 2197, 2401, 3125, 4913, 6859, 12167, 14641, 15625, 16807, 24389, 28561, 29791, 42875, 50653, 68921, 78125, 79507, 83521, 103823, 117649, 130321, 148877, 161051, 166375, 205379, 214375, 226981, 274625, 279841, 300125, 300763, 357911
Offset: 1

Views

Author

Gus Wiseman, May 16 2022

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The initial terms together with their prime indices:
       1: {}
     125: {3,3,3}
     343: {4,4,4}
     625: {3,3,3,3}
    1331: {5,5,5}
    2197: {6,6,6}
    2401: {4,4,4,4}
    3125: {3,3,3,3,3}
    4913: {7,7,7}
    6859: {8,8,8}
   12167: {9,9,9}
   14641: {5,5,5,5}
   15625: {3,3,3,3,3,3}
   16807: {4,4,4,4,4}
   24389: {10,10,10}
   28561: {6,6,6,6}
   29791: {11,11,11}
   42875: {3,3,3,4,4,4}
		

Crossrefs

The version for only parts is A007310, counted by A008483.
The version for <= 2 instead of > 2 is A018256, # of compositions A137200.
The version for only multiplicities is A036966, counted by A100405.
The version for indices and exponents prime (instead of > 2) is:
- listed by A346068
- counted by A351982
- only exponents: A056166, counted by A055923
- only parts: A076610, counted by A000607
The version for > 1 instead of > 2 is A062739, counted by A339222.
The version for compositions is counted by A353428, see A078012, A353400.
The partitions with these Heinz numbers are counted by A353501.
A000726 counts partitions with multiplicities <= 2, compositions A128695.
A001222 counts prime factors with multiplicity, distinct A001221.
A004250 counts partitions with some part > 2, compositions A008466.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914.
A295341 counts partitions with some multiplicity > 2, compositions A335464.

Programs

  • Mathematica
    Select[Range[10000],#==1||!MemberQ[FactorInteger[#],{?(#<5&),}|{,?(#<3&)}]&]

Formula

Sum_{n>=1} 1/a(n) = Product_{p prime > 3} (1 + 1/(p^2*(p-1))) = (72/95)*A065483 = 1.0154153584... . - Amiram Eldar, May 28 2022

A373347 Positive integers k such that A000120(k) > A001511(k).

Original entry on oeis.org

3, 5, 7, 9, 11, 13, 14, 15, 17, 19, 21, 22, 23, 25, 26, 27, 29, 30, 31, 33, 35, 37, 38, 39, 41, 42, 43, 45, 46, 47, 49, 50, 51, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 65, 67, 69, 70, 71, 73, 74, 75, 77, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 91, 92, 93, 94, 95, 97, 98, 99
Offset: 1

Views

Author

Paolo Xausa, Jun 01 2024

Keywords

Comments

Numbers whose binary expansion does not encode for any Schreier set (cf. A371176 and A373345).
All odd numbers > 1 are terms.

Crossrefs

Complement of A371176.
Cf. A000120, A001511, A008466, A373345, A373360 (first differences).

Programs

  • Mathematica
    Select[Range[100], DigitSum[#, 2] > IntegerExponent[#, 2] + 1 &]
  • PARI
    isok(k) = hammingweight(k) > valuation(2*k, 2); \\ Michel Marcus, Jun 07 2024
  • Python
    def isa(n): return (n - 1).bit_count() < ((n.bit_count() - 1) << 1)
    print([n for n in range(100) if isa(n)])  # Peter Luschny, Jun 07 2024
    

Formula

a(k) = 2^(n+1) - 1; a(k+1) = 2^(n+1) + 1, where k = A008466(n+1).
Previous Showing 11-20 of 37 results. Next