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

A006530 Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 5, 31, 2, 11, 17, 7, 3, 37, 19, 13, 5, 41, 7, 43, 11, 5, 23, 47, 3, 7, 5, 17, 13, 53, 3, 11, 7, 19, 29, 59, 5, 61, 31, 7, 2, 13, 11, 67, 17, 23, 7, 71, 3, 73, 37, 5, 19, 11, 13, 79, 5, 3, 41, 83, 7, 17, 43
Offset: 1

Views

Author

Keywords

Comments

The initial term a(1)=1 is purely conventional: The unit 1 is not a prime number, although it has been considered so in the past. 1 is the empty product of prime numbers, thus 1 has no largest prime factor. - Daniel Forgues, Jul 05 2011
Greatest noncomposite number dividing n, (cf. A008578). - Omar E. Pol, Aug 31 2013
Conjecture: Let a, b be nonzero integers and f(n) denote the maximum prime factor of a*n + b if a*n + b <> 0 and f(n)=0 if a*n + b=0 for any integer n. Then the set {n, f(n), f(f(n)), ...} is finite of bounded size. - M. Farrokhi D. G., Jan 10 2021

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.
  • H. L. Montgomery, Ten Lectures on the Interface Between Analytic Number Theory and Harmonic Analysis, Amer. Math. Soc., 1996, p. 210.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A020639 (smallest prime divisor), A034684, A028233, A034699, A053585.
Cf. A046670 (partial sums), A104350 (partial products).
See A385503 for "popular" primes.

Programs

  • Magma
    [ #f eq 0 select 1 else f[ #f][1] where f is Factorization(n): n in [1..86] ]; // Klaus Brockhaus, Oct 23 2008
    
  • Maple
    with(numtheory,divisors); A006530 := proc(n) local i,t1,t2,t3,t4,t5; t1 := divisors(n); t2 := convert(t1,list); t3 := sort(t2); t4 := nops(t3); t5 := 1; for i from 1 to t4 do if isprime(t3[t4+1-i]) then return t3[t4+1-i]; fi; od; 1; end;
    # alternative
    A006530 := n->max(1,op(numtheory[factorset](n))); # Peter Luschny, Nov 02 2010
  • Mathematica
    Table[ FactorInteger[n][[ -1, 1]], {n, 100}] (* Ray Chandler, Nov 12 2005 and modified by Robert G. Wilson v, Jul 16 2014 *)
  • PARI
    A006530(n)=if(n>1,vecmax(factor(n)[,1]),1) \\ Edited to cover n=1. - M. F. Hasler, Jul 30 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else max(factorint(n))
    print([a(n) for n in range(1, 87)]) # Michael S. Branicky, Aug 08 2022
    
  • SageMath
    def A006530(n): return list(factor(n))[-1][0] if n > 1 else 1
    print([A006530(n) for n in range(1, 87)])  # Peter Luschny, Jan 07 2024
  • Scheme
    ;; The following uses macro definec for the memoization (caching) of the results. A naive implementation of A020639 can be found under that entry. It could be also defined with definec to make it faster on the later calls. See http://oeis.org/wiki/Memoization#Scheme
    (definec (A006530 n) (let ((spf (A020639 n))) (if (= spf n) spf (A006530 (/ n spf)))))
    ;; Antti Karttunen, Mar 12 2017
    

Formula

a(n) = A027748(n, A001221(n)) = A027746(n, A001222(n)); a(n)^A071178(n) = A053585(n). - Reinhard Zumkeller, Aug 27 2011
a(n) = A000040(A061395(n)). - M. F. Hasler, Jan 16 2015
a(n) = n + 1 - Sum_{k=1..n} (floor((k!^n)/n) - floor(((k!^n)-1)/n)). - Anthony Browne, May 11 2016
n/a(n) = A052126(n). - R. J. Mathar, Oct 03 2016
If A020639(n) = n [when n is 1 or a prime] then a(n) = n, otherwise a(n) = a(A032742(n)). - Antti Karttunen, Mar 12 2017
a(n) has average order Pi^2*n/(12 log n) [Brouwer]. See also A046670. - N. J. A. Sloane, Jun 26 2017

Extensions

Edited by M. F. Hasler, Jan 16 2015

A020639 Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Keywords

Comments

Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
The unit 1 is not a prime number (although it has been considered so in the past). 1 is the empty product of prime numbers, thus 1 has no least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" (A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
From Stanislav Sykora, Jul 29 2017: (Start)
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
From Bob Selcoe, Oct 11 2017, edited by M. F. Hasler, Nov 06 2017: (Start)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.

Crossrefs

Cf. A090368 (bisection).
Cf. A046669 (partial sums), A072486 (partial products).
Cf. A127093.

Programs

  • Haskell
    a020639 n = spf a000040_list where
      spf (p:ps) | n < p^2      = n
                 | mod n p == 0 = p
                 | otherwise    = spf ps
    -- Reinhard Zumkeller, Jul 13 2011
    
  • Maple
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq(A020639(n),n=1..20) ; # R. J. Mathar, Oct 25 2010
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]]; Join[{1}, Array[f,120,2]]  (* Robert G. Wilson v, Apr 06 2011 *)
    Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1,1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
    Riffle[Join[{1},Table[FactorInteger[n][[1,1]],{n,3,101,2}]],2] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    A020639(n) = { vecmin(factor(n)[,1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
    
  • PARI
    A020639(n)=if(n>1, if(n>n=factor(n,0)[1,1], n, factor(n)[1,1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else min(factorint(n))
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Dec 09 2021
  • Sage
    def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
    A020639_list(97) # Peter Luschny, Jul 16 2012
    
  • Sage
    [trial_division(n) for n in (1..100)] # Giuseppe Coppoletta, May 25 2016
    
  • Scheme
    (define (A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
    

Formula

A014673(n) = a(A032742(n)); A115561(n) = a(A054576(n)). - Reinhard Zumkeller, Mar 10 2006
A028233(n) = a(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A027746(n,1) = A027748(n,1). - Reinhard Zumkeller, Aug 27 2011
For n > 1: a(n) = A240694(n,2). - Reinhard Zumkeller, Apr 10 2014
a(n) = A000040(A055396(n)) = n / A032742(n). - Antti Karttunen, Mar 07 2017
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017

Extensions

Deleted wrong comment from M. Lagneau in 2012, following an observation by Gionata Neri. - M. F. Hasler, Aug 11 2015
Edited by M. F. Hasler, Nov 06 2017
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020

A005179 Smallest number with exactly n divisors.

Original entry on oeis.org

1, 2, 4, 6, 16, 12, 64, 24, 36, 48, 1024, 60, 4096, 192, 144, 120, 65536, 180, 262144, 240, 576, 3072, 4194304, 360, 1296, 12288, 900, 960, 268435456, 720, 1073741824, 840, 9216, 196608, 5184, 1260, 68719476736, 786432, 36864, 1680, 1099511627776, 2880
Offset: 1

Views

Author

N. J. A. Sloane, David Singmaster

Keywords

Comments

A number n is called ordinary iff a(n)=A037019(n). Brown shows that the ordinary numbers have density 1 and all squarefree numbers are ordinary. See A072066 for the extraordinary or exceptional numbers. - M. F. Hasler, Oct 14 2014
All terms are in A025487. Therefore, a(n) is even for n > 1. - David A. Corneth, Jun 23 2017 [corrected by Charles R Greathouse IV, Jul 05 2023]

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 840.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 52.
  • Joe Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 86.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 89.

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (fromJust)
    a005179 n = succ $ fromJust $ elemIndex n $ map a000005 [1..]
    -- Reinhard Zumkeller, Apr 01 2011
    
  • Maple
    A005179_list := proc(SearchLimit, ListLength)
    local L, m, i, d; m := 1;
    L := array(1..ListLength,[seq(0,i=1..ListLength)]);
    for i from 1 to SearchLimit while m <= ListLength do
      d := numtheory[tau](i);
      if d <= ListLength and 0 = L[d] then L[d] := i;
      m := m + 1; fi
    od:
    print(L) end: A005179_list(65537,18);
    # If a '0' appears in the list the search limit has to be increased. - Peter Luschny, Mar 09 2011
    # alternative
    # Construct list of ordered lists of factorizations of n with
    # minimum divisors mind.
    # Returns a list with A001055(n) entries if called with mind=2.
    # Example: print(ofact(10^3,2))
    ofact := proc(n,mind)
        local fcts,d,rec,r ;
        fcts := [] ;
        for d in numtheory[divisors](n) do
            if d >= mind then
                if d = n then
                    fcts := [op(fcts),[n]] ;
                else
                    # recursive call supposed one more factor fixed now
                    rec := procname(n/d,max(d,mind)) ;
                    for r in rec do
                        fcts := [op(fcts),[d,op(r)]] ;
                    end do:
                end if;
            end if;
        end do:
        return fcts ;
    end proc:
    A005179 := proc(n)
        local Lexp,a,eList,cand,maxxrt ;
        if n = 1 then
            return 1;
        end if;
        Lexp := ofact(n,2) ;
        a := 0 ;
        for eList in Lexp do
            maxxrt := ListTools[Reverse](eList) ;
            cand := mul( ithprime(i)^ ( op(i,maxxrt)-1),i=1..nops(maxxrt)) ;
            if a =0 or cand < a then
                a := cand ;
            end if;
        end do:
        a ;
    end proc:
    seq(A005179(n),n=1..40) ; # R. J. Mathar, Jun 06 2024
  • Mathematica
    a = Table[ 0, {43} ]; Do[ d = Length[ Divisors[ n ]]; If[ d < 44 && a[[ d ]] == 0, a[[ d]] = n], {n, 1, 1099511627776} ]; a
    (* Second program: *)
    Function[s, Map[Lookup[s, #] &, Range[First@ Complement[Range@ Max@ #, #] - 1]] &@ Keys@ s]@ Map[First, KeySort@ PositionIndex@ Table[DivisorSigma[0, n], {n, 10^7}]] (* Michael De Vlieger, Dec 11 2016, Version 10 *)
    mp[1, m_] := {{}}; mp[n_, 1] := {{}}; mp[n_?PrimeQ, m_] := If[m < n, {}, {{n}}]; mp[n_, m_] := Join @@ Table[Map[Prepend[#, d] &, mp[n/d, d]], {d, Select[Rest[Divisors[n]], # <= m &]}]; mp[n_] := mp[n, n]; Table[mulpar = mp[n] - 1; Min[Table[Product[Prime[s]^mulpar[[j, s]], {s, 1, Length[mulpar[[j]]]}], {j, 1, Length[mulpar]}]], {n, 1, 100}] (* Vaclav Kotesovec, Apr 04 2021 *)
    a[n_] := Module[{e = f[n] - 1}, Min[Times @@@ ((Prime[Range[Length[#], 1, -1]]^#) & /@ e)]]; Array[a, 100] (* Amiram Eldar, Jul 26 2025 using the function f by T. D. Noe at A162247 *)
  • PARI
    (prodR(n,maxf)=my(dfs=divisors(n),a=[],r); for(i=2,#dfs, if( dfs[i]<=maxf, if(dfs[i]==n, a=concat(a,[[n]]), r=prodR(n/dfs[i],min(dfs[i],maxf)); for(j=1,#r, a=concat(a,[concat(dfs[i],r[j])]))))); a); A005179(n)=my(pf=prodR(n,n),a=1,b); for(i=1,#pf, b=prod(j=1,length(pf[i]),prime(j)^(pf[i][j]-1)); if(bA005179(n)", ")) \\ R. J. Mathar, May 26 2008, edited by M. F. Hasler, Oct 11 2014
    
  • Python
    from math import prod
    from sympy import isprime, divisors, prime
    def A005179(n):
        def mult_factors(n):
            if isprime(n):
                return [(n,)]
            c = []
            for d in divisors(n,generator=True):
                if 1Chai Wah Wu, Aug 17 2024

Formula

a(p) = 2^(p-1) for primes p: a(A000040(n)) = A061286(n); a(p^2) = 6^(p-1) for primes p: a(A001248(n)) = A061234(n); a(p*q) = 2^(q-1)*3^(p-1) for primes p<=q: a(A001358(n)) = A096932(n); a(p*m*q) = 2^(q-1) * 3^(m-1) * 5^(p-1) for primes pA005179(A007304(n)) = A061299(n). - Reinhard Zumkeller, Jul 15 2004 [This can be continued to arbitrarily many distinct prime factors since no numbers in A072066 (called "exceptional" or "extraordinary") are squarefree. - Jianing Song, Jul 18 2025]
a(p^n) = (2*3...*p_n)^(p-1) for p > log p_n / log 2. Unpublished proof from Andrzej Schinzel. - Thomas Ordowski, Jul 22 2005
If p is a prime and n=p^k then a(p^k)=(2*3*...*s_k)^(p-1) where (s_k) is the numbers of the form q^(p^j) for every q and j>=0, according to Grost (1968), Theorem 4. For example, if p=2 then a(2^k) is the product of the first k members of the A050376 sequence: number of the form q^(2^j) for j>=0, according to Ramanujan (1915). - Thomas Ordowski, Aug 30 2005
a(2^k) = A037992(k). - Thomas Ordowski, Aug 30 2005
a(n) <= A037019(n) with equality except for n in A072066. - M. F. Hasler, Jun 15 2022

Extensions

More terms from David W. Wilson

A001835 a(n) = 4*a(n-1) - a(n-2), with a(0) = 1, a(1) = 1.

Original entry on oeis.org

1, 1, 3, 11, 41, 153, 571, 2131, 7953, 29681, 110771, 413403, 1542841, 5757961, 21489003, 80198051, 299303201, 1117014753, 4168755811, 15558008491, 58063278153, 216695104121, 808717138331, 3018173449203, 11263976658481, 42037733184721, 156886956080403, 585510091136891
Offset: 0

Views

Author

Keywords

Comments

See A079935 for another version.
Number of ways of packing a 3 X 2*(n-1) rectangle with dominoes. - David Singmaster.
Equivalently, number of perfect matchings of the P_3 X P_{2(n-1)} lattice graph. - Emeric Deutsch, Dec 28 2004
The terms of this sequence are the positive square roots of the indices of the octagonal numbers (A046184) - Nicholas S. Horne (nairon(AT)loa.com), Dec 13 1999
Terms are the solutions to: 3*x^2 - 2 is a square. - Benoit Cloitre, Apr 07 2002
Gives solutions x > 0 of the equation floor(x*r*floor(x/r)) == floor(x/r*floor(x*r)) where r = 1 + sqrt(3). - Benoit Cloitre, Feb 19 2004
a(n) = L(n-1,4), where L is defined as in A108299; see also A001834 for L(n,-4). - Reinhard Zumkeller, Jun 01 2005
Values x + y, where (x, y) solves for x^2 - 3*y^2 = 1, i.e., a(n) = A001075(n) + A001353(n). - Lekraj Beedassy, Jul 21 2006
Number of 01-avoiding words of length n on alphabet {0,1,2,3} which do not end in 0. (E.g., for n = 2 we have 02, 03, 11, 12, 13, 21, 22, 23, 31, 32, 33.) - Tanya Khovanova, Jan 10 2007
sqrt(3) = 2/2 + 2/3 + 2/(3*11) + 2/(11*41) + 2/(41*153) + 2/(153*571) + ... - Gary W. Adamson, Dec 18 2007
The lower principal convergents to 3^(1/2), beginning with 1/1, 5/3, 19/11, 71/41, comprise a strictly increasing sequence; numerators = A001834, denominators = A001835. - Clark Kimberling, Aug 27 2008
From Gary W. Adamson, Jun 21 2009: (Start)
A001835 and A001353 = bisection of denominators of continued fraction [1, 2, 1, 2, 1, 2, ...]; i.e., bisection of A002530.
a(n) = determinant of an n*n tridiagonal matrix with 1's in the super- and subdiagonals and (3, 4, 4, 4, ...) as the main diagonal.
Also, the product of the eigenvalues of such matrices: a(n) = Product_{k=1..(n-1)/2)} (4 + 2*cos(2*k*Pi/n).
(End)
Let M = a triangle with the even-indexed Fibonacci numbers (1, 3, 8, 21, ...) in every column, and the leftmost column shifted up one row. a(n) starting (1, 3, 11, ...) = lim_{n->oo} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
a(n+1) is the number of compositions of n when there are 3 types of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010
For n >= 2, a(n) equals the permanent of the (2*n-2) X (2*n-2) tridiagonal matrix with sqrt(2)'s along the main diagonal, and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Primes in the sequence are apparently those in A096147. - R. J. Mathar, May 09 2013
Except for the first term, positive values of x (or y) satisfying x^2 - 4xy + y^2 + 2 = 0. - Colin Barker, Feb 04 2014
Except for the first term, positive values of x (or y) satisfying x^2 - 14xy + y^2 + 32 = 0. - Colin Barker, Feb 10 2014
The (1,1) element of A^n where A = (1, 1, 1; 1, 2, 1; 1, 1, 2). - David Neil McGrath, Jul 23 2014
Yong Hao Ng has shown that for any n, a(n) is coprime with any member of A001834 and with any member of A001075. - René Gy, Feb 25 2018
a(n+1) is the number of spanning trees of the graph T_n, where T_n is a 2 X n grid with an additional vertex v adjacent to (1,1) and (2,1). - Kevin Long, May 04 2018
a(n)/A001353(n) is the resistance of an n-ladder graph whose edges are replaced by one-ohm resistors. The resistance in ohms is measured at two nodes at one end of the ladder. It approaches sqrt(3) - 1 for n -> oo. See A342568, A357113, and A357115 for related information. - Hugo Pfoertner, Sep 17 2022
a(n) is the number of ways to tile a 1 X (n-1) strip with three types of tiles: small isosceles right triangles (with small side length 1), 1 X 1 squares formed by joining two of those right triangles along the hypotenuse, and large isosceles right triangles (with large side length 2) formed by joining two of those right triangles along a short leg. As an example, here is one of the a(6)=571 ways to tile a 1 X 5 strip with these kinds of tiles:
| / \ |\ /| |
|/_\|\/_||. - Greg Dresden and Arjun Datta, Jun 30 2023
From Klaus Purath, May 11 2024: (Start)
For any two consecutive terms (a(n), a(n+1)) = (x,y): x^2 - 4xy + y^2 = -2 = A028872(-1). In general, the following applies to all sequences (t) satisfying t(i) = 4t(i-1) - t(i-2) with t(0) = 1 and two consecutive terms (x,y): x^2 - 4xy + y^2 = A028872(t(1)-2). This includes and interprets the Feb 04 2014 comments here and on A001075 by Colin Barker and the Dec 12 2012 comment on A001353 by Max Alekseyev. By analogy to this, for three consecutive terms (x,y,z) y^2 - xz = A028872(t(1)-2). This includes and interprets the Jul 10 2021 comment on A001353 by Bernd Mulansky.
If (t) is a sequence satisfying t(k) = 3t(k-1) + 3t(k-2) - t(k-3) or t(k) = 4t(k-1) - t(k-2) without regard to initial values and including this sequence itself, then a(n) = (t(k+2n+1) + t(k))/(t(k+n+1) + t(k+n)) always applies, as long as t(k+n+1) + t(k+n) != 0 for integer k and n >= 1. (End)
Binomial transform of 1, 0, 2, 4, 12, ... (A028860 without the initial -1) and reverse binomial transform of 1, 2, 6, 24, 108, ... (A094433 without the initial 1). - Klaus Purath, Sep 09 2024

References

  • Julio R. Bastida, Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163-166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009).
  • Leonhard Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 375.
  • F. Faase, On the number of specific spanning subgraphs of the graphs G X P_n, Ars Combin. 49 (1998), 129-154.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 329.
  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Row 3 of array A099390.
Essentially the same as A079935.
First differences of A001353.
Partial sums of A052530.
Pairwise sums of A006253.
Bisection of A002530, A005246 and A048788.
First column of array A103997.
Cf. A001519, A003699, A082841, A101265, A125077, A001353, A001542, A096147 (subsequence of primes).

Programs

  • GAP
    a:=[1,1];; for n in [3..20] do a[n]:=4*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 23 2019
  • Haskell
    a001835 n = a001835_list !! n
    a001835_list =
       1 : 1 : zipWith (-) (map (4 *) $ tail a001835_list) a001835_list
    -- Reinhard Zumkeller, Aug 14 2011
    
  • Magma
    [n le 2 select 1 else 4*Self(n-1)-Self(n-2): n in [1..25]]; // Vincenzo Librandi, Sep 16 2016
    
  • Maple
    f:=n->((3+sqrt(3))^(2*n-1)+(3-sqrt(3))^(2*n-1))/6^n; [seq(simplify(expand(f(n))),n=0..20)]; # N. J. A. Sloane, Nov 10 2009
  • Mathematica
    CoefficientList[Series[(1-3x)/(1-4x+x^2), {x, 0, 24}], x] (* Jean-François Alcover, Jul 25 2011, after g.f. *)
    LinearRecurrence[{4,-1},{1,1},30] (* Harvey P. Dale, Jun 08 2013 *)
    Table[Round@Fibonacci[2n-1, Sqrt[2]], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
    Table[(3*ChebyshevT[n, 2] - ChebyshevU[n, 2])/2, {n, 0, 20}] (* G. C. Greubel, Dec 23 2019 *)
  • PARI
    {a(n) = real( (2 + quadgen(12))^n * (1 - 1 / quadgen(12)) )} /* Michael Somos, Sep 19 2008 */
    
  • PARI
    {a(n) = subst( (polchebyshev(n) + polchebyshev(n-1)) / 3, x, 2)} /* Michael Somos, Sep 19 2008 */
    
  • Sage
    [lucas_number1(n,4,1)-lucas_number1(n-1,4,1) for n in range(25)] # Zerinvary Lajos, Apr 29 2009
    
  • Sage
    [(3*chebyshev_T(n,2) - chebyshev_U(n,2))/2 for n in (0..20)] # G. C. Greubel, Dec 23 2019
    

Formula

G.f.: (1 - 3*x)/(1 - 4*x + x^2). - Simon Plouffe in his 1992 dissertation
a(1-n) = a(n).
a(n) = ((3 + sqrt(3))^(2*n - 1) + (3 - sqrt(3))^(2*n - 1))/6^n. - Dean Hickerson, Dec 01 2002
a(n) = (8 + a(n-1)*a(n-2))/a(n-3). - Michael Somos, Aug 01 2001
a(n+1) = Sum_{k=0..n} 2^k * binomial(n + k, n - k), n >= 0. - Len Smiley, Dec 09 2001
Limit_{n->oo} a(n)/a(n-1) = 2 + sqrt(3). - Gregory V. Richardson, Oct 10 2002
a(n) = 2*A061278(n-1) + 1 for n > 0. - Bruce Corrigan (scentman(AT)myfamily.com), Nov 04 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n - i, i); then q(n, 2) = a(n+1). - Benoit Cloitre, Nov 10 2002
a(n+1) = Sum_{k=0..n} ((-1)^k)*((2*n+1)/(2*n + 1 - k))*binomial(2*n + 1 - k, k)*6^(n - k) (from standard T(n,x)/x, n >= 1, Chebyshev sum formula). The Smiley and Cloitre sum representation is that of the S(2*n, i*sqrt(2))*(-1)^n Chebyshev polynomial. - Wolfdieter Lang, Nov 29 2002
a(n) = S(n-1, 4) - S(n-2, 4) = T(2*n-1, sqrt(3/2))/sqrt(3/2) = S(2*(n-1), i*sqrt(2))*(-1)^(n - 1), with S(n, x) := U(n, x/2), resp. T(n, x), Chebyshev's polynomials of the second, resp. first, kind. See A049310 and A053120. S(-1, x) = 0, S(-2, x) = -1, S(n, 4) = A001353(n+1), T(-1, x) = x.
a(n+1) = sqrt((A001834(n)^2 + 2)/3), n >= 0 (see Cloitre comment).
Sequence satisfies -2 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v. - Michael Somos, Sep 19 2008
a(n) = (1/6)*(3*(2 - sqrt(3))^n + sqrt(3)*(2 - sqrt(3))^n + 3*(2 + sqrt(3))^n - sqrt(3)*(2 + sqrt(3))^n) (Mathematica's solution to the recurrence relation). - Sarah-Marie Belcastro, Jul 04 2009
If p[1] = 3, p[i] = 2, (i > 1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i <= j), A[i,j] = -1, (i = j+1), and A[i,j] = 0 otherwise. Then, for n >= 1, a(n+1) = det A. - Milan Janjic, Apr 29 2010
a(n) = (a(n-1)^2 + 2)/a(n-2). - Irene Sermon, Oct 28 2013
a(n) = A001353(n+1) - 3*A001353(n). - R. J. Mathar, Oct 30 2015
a(n) = a(n-1) + 2*A001353(n-1). - Kevin Long, May 04 2018
From Franck Maminirina Ramaharo, Nov 11 2018: (Start)
a(n) = (-1)^n*(A125905(n) + 3*A125905(n-1)), n > 0.
E.g.f.: exp^(2*x)*(3*cosh(sqrt(3)*x) - sqrt(3)*sinh(sqrt(3)*x))/3. (End)
From Peter Bala, Feb 12 2024: (Start)
For n in Z, a(n) = A001353(n) + A001353(1-n).
For n, j, k in Z, a(n)*a(n+j+k) - a(n+j)*a(n+k) = 2*A001353(j)*A001353(k). The case j = 1, k = 2 is given above. (End)

A005228 Sequence and first differences (A030124) together list all positive numbers exactly once.

Original entry on oeis.org

1, 3, 7, 12, 18, 26, 35, 45, 56, 69, 83, 98, 114, 131, 150, 170, 191, 213, 236, 260, 285, 312, 340, 369, 399, 430, 462, 495, 529, 565, 602, 640, 679, 719, 760, 802, 845, 889, 935, 982, 1030, 1079, 1129, 1180, 1232, 1285, 1339, 1394, 1451, 1509, 1568, 1628, 1689
Offset: 1

Views

Author

Keywords

Comments

This is the lexicographically earliest sequence that together with its first differences (A030124) contains every positive integer exactly once.
Hofstadter introduces this sequence in his discussion of Scott Kim's "FIGURE-FIGURE" drawing. - N. J. A. Sloane, May 25 2013
A225850(a(n)) = 2*n-1, cf. A167151. - Reinhard Zumkeller, May 17 2013
In view of the definition of A075326: start with a(0) = 0, and extend by rule that the next term is the sum of the predecessor and the most recent non-member of the sequence. - Reinhard Zumkeller, Oct 26 2014

Examples

			Sequence reads 1 3 7 12 18 26 35 45..., differences are 2 4 5, 6, 8, 9, 10 ... and the point is that every number not in the sequence itself appears among the differences. This property (together with the fact that both the sequence and the sequence of first differences are increasing) defines the sequence!
		

References

  • E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
  • D. R. Hofstadter, Goedel, Escher, Bach: an Eternal Golden Braid, Random House, 1980, p. 73.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A030124 (complement), A037257, A056731, A056738, A140778, A225687.
Cf. A225850, A232746, A232747 (inverse), A232739, A232740, A232750 and also permutation pair A232751/A232752 constructed from this sequence and its complement.
Cf. A001651 (analog with sums instead of differences), A121229 (analog with products).
The same recurrence a(n) = a(n-1) + c(n-1) with different starting conditions: A061577 (starting with 2), A022935 (3), A022936 (4), A022937 (5), A022938 (6).
Related recurrences:
a(n-1) + c(n+1) - A022953, A022954.
a(n-1) + c(n) - A022946 to A022952.
a(n-1) + c(n-2) - A022940, A022941.
a(n-2) + c(n-1) - A022942 to A022944.
a(n-2) + c(n-2) - A022939.
a(n-3) + c(n-3) - A022955.
a(n-4) + c(n-4) - A022956.
a(n-5) + c(n-5) - A022957.

Programs

  • Haskell
    a005228 = scanl (+) 1 a030124
    a030124 = go 1 a005228 where go x ys | x < head ys = x     : go (x + 1) ys
                                         | otherwise   = x + 1 : go (x + 2) (tail ys)
    -- Maks Verver, Jun 30 2025
    
  • Maple
    maxn := 5000; h := array(1..5000); h[1] := 1; a := [1]; i := 1; b := []; for n from 2 to 1000 do if h[n] <> 1 then b := [op(b), n]; j := a[i]+n; if j < maxn then a := [op(a),j]; h[j] := 1; i := i+1; fi; fi; od: a; b; # a is A005228, b is A030124.
    A030124 := proc(n)
        option remember;
        local a,fnd,t ;
        if n <= 1 then
            op(n+1,[2,4]) ;
        else
            for a from procname(n-1)+1 do
                fnd := false;
                for t from 1 to n+1 do
                    if A005228(t)  = a then
                        fnd := true;
                        break;
                    end if;
                end do:
                if not fnd then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    A005228 := proc(n)
        option remember;
        if n <= 2 then
            op(n,[1,3]) ;
        else
            procname(n-1)+A030124(n-2) ;
        end if;
    end proc: # R. J. Mathar, May 19 2013
  • Mathematica
    a = {1}; d = 2; k = 1; Do[ While[ Position[a, d] != {}, d++ ]; k = k + d; d++; a = Append[a, k], {n, 1, 55} ]; a
    (* Second program: *)
    (* Program from Larry Morris, Jan 19 2017: *)
    d = 3; a = {1, 3, 7, 12, 18}; While[ Length[a = Join[a, a[[-1]] + Accumulate[Range[a[[d]] + 1, a[[++d]] - 1]]]] < 50]; a
    (* Comment: This adds as many terms to the sequence as there are numbers in each set of sequential differences. Consequently, the list of numbers it produces may be longer than the limit provided. With the limit of 50 shown, the sequence produced has length 60. *)
  • PARI
    A005228(n,print_all=0,s=1,used=0)={while(n--,used += 1<M. F. Hasler, Feb 05 2013

Formula

a(n) = a(n-1) + c(n-1) for n >= 2, where a(1)=1, a( ) increasing, c( ) = complement of a( ) (c is the sequence A030124).
Let a(n) = this sequence, b(n) = A030124 prefixed by 0. Then b(n) = mex{ a(i), b(i) : 0 <= i < n}, a(n) = a(n-1) + b(n) + 1. (Fraenkel)
a(1) = 1, a(2) = 3; a( ) increasing; for n >= 3, if a(q) = a(n-1)-a(n-2)+1 for some q < n then a(n) = a(n-1) + (a(n-1)-a(n-2)+2), otherwise a(n) = a(n-1) + (a(n-1)-a(n-2)+1). - Albert Neumueller (albert.neu(AT)gmail.com), Jul 29 2006
a(n) = n^2/2 + n^(3/2)/(3*sqrt(2)) + O(n^(5/4)) [proved in Jubin link]. - Benoit Jubin, May 13 2015
For all n >= 1, A232746(a(n)) = n and A232747(a(n)) = n. [Both sequences work as left inverses of this sequence.] - Antti Karttunen, May 14 2015

Extensions

Additional comments from Robert G. Wilson v, Oct 24 2001
Incorrect formula removed by Benoit Jubin, May 13 2015

A099390 Array T(m,n) read by antidiagonals: number of domino tilings (or dimer tilings) of the m X n grid (or m X n rectangle), for m>=1, n>=1.

Original entry on oeis.org

0, 1, 1, 0, 2, 0, 1, 3, 3, 1, 0, 5, 0, 5, 0, 1, 8, 11, 11, 8, 1, 0, 13, 0, 36, 0, 13, 0, 1, 21, 41, 95, 95, 41, 21, 1, 0, 34, 0, 281, 0, 281, 0, 34, 0, 1, 55, 153, 781, 1183, 1183, 781, 153, 55, 1, 0, 89, 0, 2245, 0, 6728, 0, 2245, 0, 89, 0, 1, 144, 571, 6336, 14824, 31529, 31529, 14824, 6336, 571, 144, 1
Offset: 1

Views

Author

Ralf Stephan, Oct 16 2004

Keywords

Comments

There are many versions of this array (or triangle) in the OEIS. This is the main entry, which ideally collects together all the references to the literature and to other versions in the OEIS. But see A004003 for further information. - N. J. A. Sloane, Mar 14 2015

Examples

			0,  1,  0,   1,    0,    1, ...
1,  2,  3,   5,    8,   13, ...
0,  3,  0,  11,    0,   41, ...
1,  5, 11,  36,   95,  281, ...
0,  8,  0,  95,    0, 1183, ...
1, 13, 41, 281, 1183, 6728, ...
		

References

  • S. R. Finch, Mathematical Constants, Cambridge, 2003, pp. 406-412.
  • P. E. John, H. Sachs, and H. Zernitz, Problem 5. Domino covers in square chessboards, Zastosowania Matematyki (Applicationes Mathematicae) XIX 3-4 (1987), 635-641.
  • R. P. Stanley, Enumerative Combinatorics, Vol. 1, Cambridge University Press, 2nd ed., pp. 547 and 570.
  • Darko Veljan, Kombinatorika: s teorijom grafova (Croatian) (Combinatorics with Graph Theory) mentions the value 12988816 = 2^4*901^2 for the 8 X 8 case on page 4.

Crossrefs

See A187596 for another version (with m >= 0, n >= 0). See A187616 for a triangular version. See also A187617, A187618.
See also A004003 for more literature on the dimer problem.
Main diagonal is A004003.

Programs

  • Maple
    (Maple code for the even-numbered rows from N. J. A. Sloane, Mar 15 2015. This is not totally satisfactory since it uses floating point. However, it is useful for getting the initial values quickly.)
    Digits:=100;
    p:=evalf(Pi);
    z:=proc(h,d) global p; evalf(cos( h*p/(2*d+1) )); end;
    T:=proc(m,n) global z; round(mul( mul( 4*z(h,m)^2+4*z(k,n)^2, k=1..n), h=1..m)); end;
    [seq(T(1,n),n=0..10)]; # A001519
    [seq(T(2,n),n=0..10)]; # A188899
    [seq(T(3,n),n=0..10)]; # A256044
    [seq(T(n,n),n=0..10)]; # A004003
  • Mathematica
    T[?OddQ, ?OddQ] = 0;
    T[m_, n_] := Product[2*(2+Cos[2j*Pi/(m+1)]+Cos[2k*Pi/(n+1)]), {k, 1, n/2}, {j, 1, m/2}];
    Flatten[Table[Round[T[m-n+1, n]], {m, 1, 12}, {n, 1, m}]] (* Jean-François Alcover, Nov 25 2011, updated May 28 2022 *)
  • PARI
    {T(n, k) = sqrtint(abs(polresultant(polchebyshev(n, 2, x/2), polchebyshev(k, 2, I*x/2))))} \\ Seiichi Manyama, Apr 13 2020

Formula

T(m, n) = Product_{j=1..ceiling(m/2)} Product_{k=1..ceiling(n/2)} (4*cos(j*Pi/(m+1))^2 + 4*cos(k*Pi/(n+1))^2).

Extensions

Old link fixed and new link added by Frans J. Faase, Feb 04 2009
Entry edited by N. J. A. Sloane, Mar 15 2015

A030124 Complement (and also first differences) of Hofstadter's sequence A005228.

Original entry on oeis.org

2, 4, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 20, 21, 22, 23, 24, 25, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Keywords

Comments

For any n, all integers k satisfying sum(i=1,n,a(i))+1Benoit Cloitre, Apr 01 2002
The asymptotic equivalence a(n) ~ n follows from the fact that the values disallowed in the present sequence because they occur in A005228 are negligible, since A005228 grows much faster than A030124. The next-to-leading term in the formula is calculated from the functional equation F(x) + G(x) = x, suggested by D. Wilson (cf. reference), where F and G are the inverse functions of smooth, increasing approximations f and f' of A005228 and A030124. It seems that higher order corrections calculated from this equation do not agree with the real behavior of a(n). - M. F. Hasler, Jun 04 2008
A225850(a(n)) = 2*n, cf. A167151. - Reinhard Zumkeller, May 17 2013

References

  • E. Angelini, "Jeux de suites", in Dossier Pour La Science, pp. 32-35, Volume 59 (Jeux math'), April/June 2008, Paris.
  • D. R. Hofstadter, "Gödel, Escher, Bach: An Eternal Golden Braid", Basic Books, 1st & 20th anniv. edition (1979 & 1999), p. 73.

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a030124 n = a030124_list !! n
    a030124_list = figureDiff 1 [2..] where
       figureDiff n (x:xs) = x : figureDiff n' (delete n' xs) where n' = n + x
    -- Reinhard Zumkeller, Mar 03 2011
  • Mathematica
    (* h stands for Hofstadter's sequence A005228 *) h[1] = 1; h[2] = 3; h[n_] := h[n] = 2*h[n-1] - h[n-2] + If[ MemberQ[ Array[h, n-1], h[n-1] - h[n-2] + 1], 2, 1]; Differences[ Array[h, 69]] (* Jean-François Alcover, Oct 06 2011 *)
  • PARI
    {a=b=t=1;for(i=1,100, while(bittest(t,b++),); print1(b",");t+=1<M. F. Hasler, Jun 04 2008
    

Formula

a(n) = n + sqrt(2n) + o(n^(1/2)). - M. F. Hasler, Jun 04 2008 [proved in Jubin's paper].

Extensions

Changed offset to agree with that of A005228. - N. J. A. Sloane, May 19 2013

A250662 Number A(n,k) of tilings of a 2k X n rectangle using 2n k-ominoes of shape I; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 6, 36, 1, 1, 1, 1, 1, 1, 13, 95, 1, 1, 1, 1, 1, 1, 7, 22, 281, 1, 1, 1, 1, 1, 1, 1, 15, 64, 781, 1, 1, 1, 1, 1, 1, 1, 8, 25, 155, 2245, 1, 1, 1, 1, 1, 1, 1, 1, 17, 37, 321, 6336, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 26 2014

Keywords

Examples

			Square array A(n,k) begins:
  1, 1,    1,   1,   1,  1,  1,  1,  1, ...
  1, 1,    1,   1,   1,  1,  1,  1,  1, ...
  1, 1,    5,   1,   1,  1,  1,  1,  1, ...
  1, 1,   11,   6,   1,  1,  1,  1,  1, ...
  1, 1,   36,  13,   7,  1,  1,  1,  1, ...
  1, 1,   95,  22,  15,  8,  1,  1,  1, ...
  1, 1,  281,  64,  25, 17,  9,  1,  1, ...
  1, 1,  781, 155,  37, 28, 19, 10,  1, ...
  1, 1, 2245, 321, 100, 41, 31, 21, 11, ...
		

Crossrefs

Columns k=0+1,2-10 give: A000012, A005178(n+1), A236577, A236582, A247117, A250663, A250664, A250665, A250666, A250667.
Cf. A251072.

Programs

  • Maple
    b:= proc(n, l) option remember; local d, k; d:= nops(l)/2;
          if n=0 then 1
        elif min(l[])>0 then (m->b(n-m, map(x->x-m, l)))(min(l[]))
        else for k while l[k]>0 do od;
             `if`(nd+1 or max(l[k..k+d-1][])>0, 0,
              b(n, [l[1..k-1][],1$d,l[k+d..2*d][]]))
          fi
        end:
    A:= (n, k)-> `if`(k=0, 1, b(n, [0$2*k])):
    seq(seq(A(n,d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, l_List] := b[n, l] = Module[{d = Length[l]/2, k}, Which[n == 0, 1, Min[l] > 0 , Function[{m}, b[n-m, l-m]][Min[l]], True, For[k=1, l[[k]] > 0, k++]; If[n d]]] + If[d == 1 || k > d+1 || Max[l[[k ;; k+d-1]]] > 0, 0, b[n, Join[l[[1 ;; k-1]], Array[1&, d], l[[k+d ;; 2*d]]]]]]]; A[n_, k_] := If[k == 0, 1, b[n, Array[0&, 2k]]]; Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Jan 30 2015, after Alois P. Heinz *)

A189006 Array A(m,n) read by antidiagonals: number of domino tilings of the m X n grid with upper left corner removed iff m*n is odd, (m>=0, n>=0).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 1, 1, 5, 4, 5, 1, 1, 1, 1, 8, 11, 11, 8, 1, 1, 1, 1, 13, 15, 36, 15, 13, 1, 1, 1, 1, 21, 41, 95, 95, 41, 21, 1, 1, 1, 1, 34, 56, 281, 192, 281, 56, 34, 1, 1, 1, 1, 55, 153, 781, 1183, 1183, 781, 153, 55, 1, 1, 1, 1, 89, 209, 2245, 2415, 6728, 2415, 2245, 209, 89, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Apr 15 2011

Keywords

Examples

			A(3,3) = 4, because there are 4 domino tilings of the 3 X 3 grid with upper left corner removed:
  . .___. . .___. . .___. . .___.
  ._|___| ._|___| ._| | | ._|___|
  | |___| | | | | | |_|_| |___| |
  |_|___| |_|_|_| |_|___| |___|_|
Array begins:
  1, 1,  1,  1,   1,    1,    1, ...
  1, 1,  1,  1,   1,    1,    1, ...
  1, 1,  2,  3,   5,    8,   13, ...
  1, 1,  3,  4,  11,   15,   41, ...
  1, 1,  5, 11,  36,   95,  281, ...
  1, 1,  8, 15,  95,  192, 1183, ...
  1, 1, 13, 41, 281, 1183, 6728, ...
		

Crossrefs

Rows m=0+1, 2-12 give: A000012, A000045(n+1), A002530(n+1), A005178(n+1), A189003, A028468, A189004, A028470, A189005, A028472, A210724, A028474.
Main diagonal gives: A189002.

Programs

  • Maple
    with(LinearAlgebra):
    A:= proc(m, n) option remember; local i, j, s, t, M;
          if m=0 or n=0 then 1
        elif m1 or j>1 or s=0 then
                   if j
    				
  • Mathematica
    A[1, 1] = 1; A[m_, n_] := A[m, n] = Module[{i, j, s, t, M}, Which[m == 0 || n == 0, 1, m < n, A[n, m], True, s = Mod[n*m, 2];M[i_, j_] /; j < i := -M[j, i]; M[, ] = 0; For[i = 1, i <= n, i++, For[j = 1, j <= m, j++, t = (i-1)*m+j-s; If[i > 1 || j > 1 || s == 0, If[j < m, M[t, t+1] = 1]; If[i < n, M[t, t+m] = 1-2*Mod[j, 2]]]]]; Sqrt[Det[Array[M, {n*m-s, n*m-s}]]]]]; Table[Table[A[m, d-m], {m, 0, d}], {d, 0, 15}] // Flatten (* Jean-François Alcover, Dec 26 2013, translated from Maple *)

A028468 Number of perfect matchings in graph P_{6} X P_{n}.

Original entry on oeis.org

1, 1, 13, 41, 281, 1183, 6728, 31529, 167089, 817991, 4213133, 21001799, 106912793, 536948224, 2720246633, 13704300553, 69289288909, 349519610713, 1765722581057, 8911652846951, 45005025662792, 227191499132401, 1147185247901449, 5791672851807479
Offset: 0

Views

Author

Keywords

References

  • F. Faase, On the number of specific spanning subgraphs of the graphs G X P_n, Ars Combin. 49 (1998), 129-154.
  • R. P. Stanley, Enumerative Combinatorics I, p. 292.

Crossrefs

Row 6 of arrays A099390, A189006.
Column k=2 of A251072.
Cf. A005178.

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (x^2-2*x-1)*(x^4+2*x^3-3*x^2-2*x+1)/((1-x^2)*(x^3-5*x^2+6*x-1)*(x^3+ 6*x^2+5*x+1)) )); // G. C. Greubel, Nov 25 2018
    
  • Maple
    seq(coeff(series((1+2*x-x^2)*(x^4+2*x^3-3*x^2-2*x+1)/((x-1)*(x+1)*(x^3-5*x^2+6*x-1)*(x^3+6*x^2+5*x+1)),x,n+1), x, n), n = 0 .. 25); # Muniru A Asiru, Nov 23 2018
  • Mathematica
    a[n_] := Product[2(2 + Cos[(2 k Pi)/7] + Cos[(2 j Pi)/(n+1)]), {k, 1, 3}, {j, 1, n/2}] // Round;
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Aug 19 2018, after A099390 *)
    LinearRecurrence[{1, 20, 10, -38, -10, 20, -1, -1}, {1, 1, 13, 41, 281, 1183, 6728, 31529}, 30] (* Vincenzo Librandi, Nov 24 2018 *)
  • PARI
    my(x='x+O('x^30)); Vec(-(x^2-2*x-1)*(x^4+2*x^3-3*x^2-2*x+1)/((x-1)*(1+x)*(x^3-5*x^2+6*x-1)*(x^3+6*x^2+5*x+1))) \\ Altug Alkan, Mar 23 2016
    
  • Sage
    s=((x^2-2*x-1)*(x^4+2*x^3-3*x^2-2*x+1)/((1-x^2)*(x^3-5*x^2+6*x-1) *(x^3+6*x^2+5*x+1))).series(x,30); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 25 2018

Formula

From N. J. A. Sloane, Feb 03 2009: (Start)
a(1) = 1,
a(2) = 13,
a(3) = 41,
a(4) = 281,
a(5) = 1183,
a(6) = 6728,
a(7) = 31529,
a(8) = 167089,
a(9) = 817991,
a(10) = 4213133,
a(11) = 21001799,
a(12) = 106912793,
a(13) = 536948224,
a(14) = 2720246633, and
a(n) = 40*a(n-2) - 416*a(n-4) + 1224*a(n-6) - 1224*a(n-8) + 416*a(n-10) - 40*a(n-12) + a(n-14). (From Faase's web page.) (End)
G.f.: (x^2-2*x-1)*(x^4+2*x^3-3*x^2-2*x+1) / ( (1-x) *(1+x) *(x^3-5*x^2+6*x-1) *(x^3+6*x^2+5*x+1) ).
a(n) = a(n-1)+20*a(n-2)+10*a(n-3)-38*a(n-4)-10*a(n-5)+20*a(n-6)-a(n-7)-a(n-8). - Sergey Perepechko, Sep 23 2018
Showing 1-10 of 26 results. Next