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 84 results. Next

A167936 a(n) = 2^n - A108411(n).

Original entry on oeis.org

0, 1, 1, 5, 7, 23, 37, 101, 175, 431, 781, 1805, 3367, 7463, 14197, 30581, 58975, 124511, 242461, 504605, 989527, 2038103, 4017157, 8211461, 16245775, 33022991, 65514541, 132623405, 263652487, 532087943, 1059392917, 2133134741, 4251920575, 8546887871
Offset: 0

Views

Author

Paul Curtz, Nov 15 2009

Keywords

Comments

The binomial transform of (0 followed by A077917).

Crossrefs

Programs

  • Magma
    I:=[0,1,1]; [n le 3 select I[n] else 2*Self(n-1) +3*Self(n-2) -6*Self(n-3): n in [1..40]]; // G. C. Greubel, Sep 10 2023
    
  • Mathematica
    LinearRecurrence[{2,3,-6}, {0,1,1}, 50] (* G. C. Greubel, Jul 01 2016 *)
  • Python
    def A167936(n): return (1<>1) # Chai Wah Wu, Nov 14 2023
  • SageMath
    def A167936(n): return 2^n - ((n+1)%2)*3^(n//2) - (n%2)*3^((n-1)//2)
    [A167936(n) for n in range(41)] # G. C. Greubel, Sep 10 2023
    

Formula

a(n) = A167762(n+1) - A167762(n).
a(n+1) - a(n) = A167784(n).
a(n) = 2*a(n-1) + 3*a(n-2) - 6*a(n-3).
G.f.: x*(1-x)/((1-2*x)*(1-3*x^2)).
a(2n) = A005061(n), a(2n+1) = A085350(n).
a(n) - 2*a(n-1) = (-1)^(n+1)*A083658(n+1).
From G. C. Greubel, Sep 10 2023: (Start)
a(n) = (1/2)*(2^(n+1) - (1+(-1)^n)*3^(n/2) - (1-(-1)^n)*3^((n-1)/2)).
E.g.f.: exp(2*x) - cosh(sqrt(3)*x) - (1/sqrt(3))*sinh(sqrt(3)*x). (End)

Extensions

Edited and extended by R. J. Mathar, Feb 27 2010

A016197 a(n) = 12^n - 11^n.

Original entry on oeis.org

0, 1, 23, 397, 6095, 87781, 1214423, 16344637, 215622815, 2801832661, 35979939623, 457696700077, 5777672071535, 72470493235141, 904168630965623, 11229773405170717, 138934529031464255, 1713164078241143221
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. k^n-(k-1)^n: A000225 (k=2), A001047 (k=3), A005061 (k=4), A005060 (k=5), A005062 (k=6), A016169 (k=7), A016177 (k=8), A016185 (k=9), A016189 (k=10), A016195 (k=11), this sequence (k=12).

Programs

Formula

G.f.: x/((1-11x)(1-12x)).
E.g.f.: e^(12*x)-e^(11*x). - Mohammad K. Azarian, Jan 14 2009
a(0)=0, a(n)=12*a(n-1)+11^(n-1). - _Vincenzo Librandi-, Feb 09 2011
a(0)=0, a(1)=1, a(n)=23*a(n-1)-132*a(n-2). - Vincenzo Librandi, Feb 09 2011

A051589 Number of 5xn binary matrices such that any 2 rows have a common 1.

Original entry on oeis.org

0, 1, 63, 3367, 167835, 7803391, 339133803, 13887495007, 541044196875, 20237096702431, 732455240043243, 25820836854042847, 891331324715015115, 30260208833985800671, 1013882831306569043883, 33620617443978687281887, 1105857774681062127612555
Offset: 0

Views

Author

Vladeta Jovovic, Goran Kilibarda

Keywords

Crossrefs

Programs

  • GAP
    List([0..20], n-> 32^n-10*24^n+30*20^n-5*18^n+5*17^n-70*16^n-30*15^n +135*14^n +30*13^n-140*12^n-2*11^n+130*10^n-110*9^n+45*8^n-10*7^n +6^n); # G. C. Greubel, Nov 12 2019
  • Magma
    [32^n-10*24^n+30*20^n-5*18^n+5*17^n-70*16^n-30*15^n +135*14^n +30*13^n-140*12^n-2*11^n+130*10^n-110*9^n+45*8^n-10*7^n +6^n: n in [0..20]]; // Vincenzo Librandi, Sep 18 2018
    
  • Maple
    A051589(n):=32^n -10*24^n +30*20^n -5*18^n +5*17^n -70*16^n -30*15^n + 135*14^n +30*13^n -140*12^n -2*11^n +130*10^n -110*9^n +45*8^n -10*7^n +6^n; seq(A051589(n), n=0..20); # G. C. Greubel, Nov 12 2019
  • Mathematica
    Table[32^n -10*24^n +30*20^n -5*18^n +5*17^n -70*16^n -30*15^n +135*14^n +30*13^n -140*12^n -2*11^n +130*10^n -110*9^n +45*8^n -10*7^n +6^n, {n, 0, 30}] (* Vincenzo Librandi, Sep 18 2018 *)
  • PARI
    vector(21, n, m=n-1; 32^m -10*24^m +30*20^m -5*18^m +5*17^m -70*16^m -30*15^m +135*14^m +30*13^m -140*12^m -2*11^m +130*10^m -110*9^m +45*8^m -10*7^m +6^m) \\ G. C. Greubel, Nov 12 2019
    
  • Sage
    [32^n-10*24^n+30*20^n-5*18^n+5*17^n-70*16^n-30*15^n +135*14^n +30*13^n-140*12^n-2*11^n+130*10^n-110*9^n+45*8^n-10*7^n +6^n for n in (0..20)] # G. C. Greubel, Nov 12 2019
    

Formula

a(n) = 32^n - 10*24^n + 30*20^n - 5*18^n + 5*17^n - 70*16^n - 30*15^n + 135*14^n + 30*13^n - 140*12^n - 2*11^n + 130*10^n - 110*9^n + 45*8^n - 10*7^n + 6^n.
G.f.: x*(933561925632000*x^14 -1286309121638400*x^13 +786606914672640*x^12 -287219252934144*x^11 +70324589076096*x^10 -12248067009984*x^9 +1568017231256*x^8 -150181430252*x^7 +10834851518*x^6 -587198697*x^5 +23594853*x^4 -684354*x^3 +13636*x^2 -169*x +1) / ((6*x -1)*(7*x -1)*(8*x -1)*(9*x -1)*(10*x -1)*(11*x -1)*(12*x -1)*(13*x -1)*(14*x -1)*(15*x -1)*(16*x -1)*(17*x -1)*(18*x -1)*(20*x -1)*(24*x -1)*(32*x -1)). - Colin Barker, Feb 22 2013

Extensions

Revised Aug 03 2000

A069378 Number of n X 3 binary arrays with a path of adjacent 1's from top row to bottom row.

Original entry on oeis.org

7, 37, 197, 1041, 5503, 29089, 153769, 812849, 4296863, 22713981, 120070149, 634712209, 3355201895, 17736195433, 93756691401, 495614587553, 2619907077991, 13849295944501, 73209847696773
Offset: 1

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Crossrefs

Column 3 of A359576.
Cf. 1 X n A000225, 2 X n A005061, n X 2 A001333, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(7-12*x+x^2+2*x^3-2*x^4)/(1-7*x+9*x^2+x^3-4*x^4+2*x^5))); // G. C. Greubel, Apr 22 2018
  • Mathematica
    Rest[CoefficientList[Series[x*(7-12*x+x^2+2*x^3-2*x^4)/(1-7*x+9*x^2+x^3-4*x^4 +2*x^5), {x,0,50}], x]] (* G. C. Greubel, Apr 22 2018 *)
  • PARI
    x='x+O('x^30); Vec(x*(7-12*x+x^2+2*x^3-2*x^4)/(1 -7*x+9*x^2 +x^3- 4*x^4+2*x^5)) \\ G. C. Greubel, Apr 22 2018
    

Formula

G.f.: x*(7-12*x+x^2+2*x^3-2*x^4)/(1-7*x+9*x^2+x^3-4*x^4+2*x^5). - Vladeta Jovovic, Jul 02 2003

A069379 Number of n X 4 binary arrays with a path of adjacent 1's from top row to bottom row.

Original entry on oeis.org

15, 175, 1985, 22193, 247759, 2764991, 30856705, 344356289, 3842988975, 42887577455, 478623939553, 5341429762353, 59610217019311, 665248512113343, 7424156719466465, 82853403589520257, 924641917817567951
Offset: 1

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Crossrefs

Column 4 of A359576.
Cf. 1 X n A000225, 2 X n A005061, n X 2 A001333, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.

A280208 Numbers m such that 4^m - 3^m is not squarefree, but 4^d - 3^d is squarefree for every proper divisor d of m.

Original entry on oeis.org

4, 14, 55, 78, 111, 253, 342, 355
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 28 2016

Keywords

Comments

Where numbers m such that 4^m - 3^m is not squarefree: numbers of the form i*a(j) for i >= 1.
The smallest squares of 4^m - 3^m as defined above are 25, 49, 121, 169, 1369, 529, 361, 5041. - Robert Price, Mar 07 2017
431 <= a(9) <= 1081. 1081, 3403 are terms. - Chai Wah Wu, Jul 20 2020

Examples

			4 is in this sequence because all 4^1 - 3^1 = 1, 4^2 - 3^2 = 7 are squarefrees where 1, 2 are proper divisors of 4 and 4^4 - 3^4 = 175 = 7*5^2 is not squarefree;
14 is in this sequence because all 4^1 = 3^2 = 1, 4^2 - 3^2 = 7, 4^7 - 3^7 = 14197 are squarefrees where 1, 2, 7 are proper divisors of 14 and 4^14 - 3^14 = 263652487 = 7^2*3591*14197 is not squarefree.
		

Crossrefs

Cf. A005061.
Cf. Numbers m such that (k+1)^m - k^m is not squarefree, but (k+1)^d - k^d is squarefree for every proper divisor d of m: A237043 (k = 1), A280203 (k = 2), this sequence (k = 3), A280209 (k = 4), A280307 (k = 6).

Programs

  • Mathematica
    Function[s, DeleteCases[#, 0] &@ MapIndexed[#1 Boole[! AnyTrue[Take[s, First@ #2 - 1], Function[k, Divisible[#1, k]]]] &, s]]@ Select[Range@ 80, ! SquareFreeQ[4^# - 3^#] &] (* Michael De Vlieger, Dec 30 2016 *)

Extensions

a(6)-a(8) from Jinyuan Wang, May 15 2020

A016753 Expansion of 1/((1-3*x)*(1-4*x)*(1-5*x)).

Original entry on oeis.org

1, 12, 97, 660, 4081, 23772, 133057, 724260, 3863761, 20308332, 105558817, 544039860, 2785713841, 14192221692, 72020501377, 364354427460, 1838822866321, 9262446387852, 46585947584737
Offset: 0

Views

Author

Keywords

Comments

As (0,0,1,12,97,...) this is the fourth binomial transform of cosh(x)-1. It is the binomial transform of A016269, when this has two leading zeros. Its e.g.f. is then exp(4x)cosh(x) - exp(4x). - Paul Barry, May 13 2003
This gives the third column of the Sheffer triangle A143495 (3-restricted Stirling2 numbers). See the e.g.f. below, and A193685 for comments on the general case. - Wolfdieter Lang, Oct 08 2011
From Kevin Long, Mar 25 2017: (Start)
In the power set poset 2^(n+2), a(n) gives the number of size 3 subposets {A,B,C} such that A subset of C, B subset of C, and A||B. By symmetry, it also counts the size 3 subposets {A,B,C} such that C subset of A, C subset of B, and A||B.
By the power set poset, I mean the subsets of [n+2] ordered by inclusion. A||B means A and B are incomparable.
The result can be proved by showing that the formula holds. 5^n counts triples (A,B,C) of subsets of [n] where A subset of C and B subset of C, since for each x in [n], it is either in C only, in A and C, in B and C, in all three, or in none. However, this also counts the cases where A subset of B and where B subset of A, and we want A||B.
Each case can be counted by 4^n, since if A subset of B⊆C, then each element x of [n] is either in all three, in B and C, in only C, or in none. Hence we subtract 2*4^n from 5^n. These two cases intersect, however, when A = B subset of C, which can be counted by 3^n, since each element x of [n] can be either in all three sets, in only C, or in none.
For the purposes of inclusion-exclusion, we add these sets back in to get 5^n-2*4^n+3^n to count all triples (A,B,C) where A subset of C, B subset of C, and A||B. We want sets, not triples, so this double-counts the sets since interchanging A and B give the same set, so we divide this by 2. Hence the formula for a(n) counts these subposets for 2^(n+2). (End)

Crossrefs

Programs

  • Magma
    [(5^(n+2) - 2*4^(n+2) + 3^(n+2))/2: n in [0..30]]; // G. C. Greubel, Sep 15 2018
  • Mathematica
    CoefficientList[ Series[ 1/((1 - 3x)(1 - 4x)(1 - 5x)), {x, 0, 25} ], x ]
    LinearRecurrence[{12,-47,60}, {1, 12, 97}, 30] (* G. C. Greubel, Sep 15 2018 *)
  • PARI
    Vec(1/((1-3*x)*(1-4*x)*(1-5*x))+O(x^99)) \\ Charles R Greathouse IV, Sep 26 2012
    

Formula

a(n) = 5^(n+2)/2 - 4^(n+2) + 3^(n+2)/2. - Paul Barry, May 13 2003
If we define f(m,j,x) = Sum_{k=j..m} binomial(m,k)*stirling2(k,j)*x^(m-k) then a(n-2) = f(n,2,3), (n >= 2). - Milan Janjic, Apr 26 2009
a(n) = 9*a(n-1) - 20*a(n-2) + 3^n, n >= 2. - Vincenzo Librandi, Mar 20 2011
O.g.f.: 1/((1-3*x)*(1-4*x)*(1-5*x)).
E.g.f.: (d^2/dx^2) (exp(3*x)*((exp(x)-1)^2)/2!). - Wolfdieter Lang, Oct 08 2011
a(n) = A245019(n+2)/2. - Kevin Long, Mar 24 2017

A069380 Number of n X 5 binary arrays with a path of adjacent 1's from top row to bottom row.

Original entry on oeis.org

31, 781, 18621, 433809, 10056959, 232824241, 5388274121, 124693133113, 2885579381831, 66776768695477, 1545323639404349, 35761396310047985, 827579980089997079, 19151628770974955241, 443201843190147840905
Offset: 1

Views

Author

R. H. Hardin, Mar 22 2002

Keywords

Crossrefs

Column 5 of A359576.
Cf. 1 X n A000225, 2 X n A005061, n X 2 A001333, vertical path of 1 A069361-A069395, vertical paths of 0+1 A069396-A069416, vertical path of 1 not 0 A069417-A069428, no vertical paths A069429-A069447, no horizontal or vertical paths A069448-A069452.

A175840 Mirror image of Nicomachus' table: T(n,k) = 3^(n-k)*2^k for n>=0 and 0<=k<=n.

Original entry on oeis.org

1, 3, 2, 9, 6, 4, 27, 18, 12, 8, 81, 54, 36, 24, 16, 243, 162, 108, 72, 48, 32, 729, 486, 324, 216, 144, 96, 64, 2187, 1458, 972, 648, 432, 288, 192, 128, 6561, 4374, 2916, 1944, 1296, 864, 576, 384, 256, 19683, 13122, 8748, 5832, 3888, 2592, 1728, 1152, 768, 512
Offset: 0

Views

Author

Johannes W. Meijer, Sep 21 2010, Jul 13 2011, Jun 03 2012

Keywords

Comments

Lenstra calls these numbers the harmonic numbers of Philippe de Vitry (1291-1361). De Vitry wanted to find pairs of harmonic numbers that differ by one. Levi ben Gerson, also known as Gersonides, proved in 1342 that there are only four pairs with this property of the form 2^n*3^m. See also Peterson’s story ‘Medieval Harmony’.
This triangle is the mirror image of Nicomachus' table A036561. The triangle sums, see the crossrefs, mirror those of A036561. See A180662 for the definitions of these sums.

Examples

			1;
3, 2;
9, 6, 4;
27, 18, 12, 8;
81, 54, 36, 24, 16;
243, 162, 108, 72, 48, 32;
		

Crossrefs

Triangle sums: A001047 (Row1), A015441 (Row2), A016133 (Kn1 & Kn4), A005061 (Kn2 & Kn3), A016153 (Fi1& Fi2), A180844 (Ca1 & Ca4), A016140 (Ca2, Ca3), A180846 (Gi1 & Gi4), A180845 (Gi2 & Gi3), A016185 (Ze1 & Ze4), A180847 (Ze2 & Ze3).

Programs

  • Haskell
    a175840 n k = a175840_tabf !! n !! k
    a175840_row n = a175840_tabf !! n
    a175840_tabf = iterate (\xs@(x:_) -> x * 3 : map (* 2) xs) [1]
    -- Reinhard Zumkeller, Jun 08 2013
  • Maple
    A175840 := proc(n,k): 3^(n-k)*2^k end: seq(seq(A175840(n,k),k=0..n),n=0..9);
  • Mathematica
    Flatten[Table[3^(n-k) 2^k,{n,0,10},{k,0,n}]] (* Harvey P. Dale, May 08 2013 *)

Formula

T(n,k) = 3^(n-k)*2^k for n>=0 and 0<=k<=n.
T(n,n-k) = T(n,n-k+1) + T(n-1,n-k) for n>=1 and 1<=k<=n with T(n,n) = 2^n for n>=0.

A300332 Integers of the form Sum_{j in 0:p-1} x^j*y^(p-j-1) where x and y are positive integers with max(x, y) >= 2 and p is some prime.

Original entry on oeis.org

3, 4, 7, 12, 13, 19, 21, 27, 28, 31, 37, 39, 43, 48, 49, 52, 57, 61, 63, 67, 73, 75, 76, 79, 80, 84, 91, 93, 97, 103, 108, 109, 111, 112, 117, 121, 124, 127, 129, 133, 139, 147, 148, 151, 156, 157, 163, 169, 171, 172, 175, 181, 183, 189, 192, 193, 196, 199
Offset: 1

Views

Author

Peter Luschny, Mar 03 2018

Keywords

Comments

Equivalently these are the integers represented by a cyclotomic binary form Phi_p(x,y) where p is prime and x and y are positive integers with max(x,y) >= 2. A cyclotomic binary form (over Z) is a homogeneous polynomial in two variables of the form f(x, y) = y^phi(k)*Phi(k, x/y) where Phi(k, z) is a cyclotomic polynomial of index k and phi is Euler's totient function.
An efficient and safe calculation of this sequence requires a precise knowledge of the range of possible solutions of the associated Diophantine equations. The bounds used in the Julia program below were specified by Fouvry, Levesque and Waldschmidt.

Examples

			Let p denote an odd prime. Subsequences are numbers of the form
2^p - 1,         (A001348) (x = 1, y = 2) (Mersenne numbers),
p*2^(p - 1),     (A299795) (x = 2, y = 2),
(3^p - 1)/2,     (A003462) (x = 1, y = 3),
3^p - 2^p,       (A135171) (x = 2, y = 3),
p*3^(p - 1),     (A027471) (x = 3, y = 3),
(4^p - 1)/3,     (A002450) (x = 1, y = 4),
2^(p-1)*(2^p-1), (A006516) (x = 2, y = 4),
4^p - 3^p,       (A005061) (x = 3, y = 4),
p*4^(p - 1),     (A002697) (x = 4, y = 4),
(p^p-1)/(p-1),   (A023037),
p^p,             (A000312, A051674).
.
The generalized cuban primes A007645 are a subsequence, as are the quintan primes A002649, the septan primes and so on.
All primes in this sequence less than 1031 are generalized cuban primes. 1031 is an element because 1031 = f(5,2) where f(x,y) = x^4 + y*x^3 + y^2*x^2 + y^3*x + y^4, however 1031 is not a cuban prime because 1030 is not divisible by 6.
		

Crossrefs

Programs

  • Julia
    using Primes
    function isA300332(n)
        logn = log(n)^1.161
        K = Int(floor(5.383*logn))
        M = Int(floor(2*(n/3)^(1/2)))
        k = 2
        while k <= K
            if k == 7
                K = Int(floor(4.864*logn))
                M = Int(ceil(2*(n/11)^(1/4)))
            end
            for y in 2:M, x in 1:y
                r = x == y ? k*y^(k - 1) : div(x^k - y^k, x - y)
                n == r && return true
            end
            k = nextprime(k+1)
        end
        return false
    end
    A300332list(upto) = [n for n in 1:upto if isA300332(n)]
    println(A300332list(200))
Previous Showing 21-30 of 84 results. Next