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-5 of 5 results.

A027649 a(n) = 2*(3^n) - 2^n.

Original entry on oeis.org

1, 4, 14, 46, 146, 454, 1394, 4246, 12866, 38854, 117074, 352246, 1058786, 3180454, 9549554, 28665046, 86027906, 258149254, 774578834, 2323998646, 6972520226, 20918609254, 62757924914, 188277969046, 564842295746, 1694543664454, 5083664547794, 15251060752246
Offset: 0

Views

Author

Keywords

Comments

Poly-Bernoulli numbers B_n^(k) with k=-2.
Binomial transform of A007051, if both sequences start at 0. Binomial transform of A000225(n+1). - Paul Barry, Mar 24 2003
Euler expands (1-z)/(1-5z+6z^2) and finds the general term. Section 226 of the Introductio indicates that he could have written down the recursion relation: a(n) = 5 a(n-1)-6 a(n-2). - V. Frederick Rickey (fred-rickey(AT)usma.edu), Feb 10 2006
Let R be a binary relation on the power set P(A) of a set A having n = |A| elements such that for every element x, y of P(A), xRy if x is a subset of y or y is a subset of x. Then a(n) = |R|. - Ross La Haye, Dec 22 2006
With regard to the comment by Ross La Haye: For proper subsets see A056182. - For nonempty subsets see A091344. - For nonempty proper subsets see a(n+1) in A260217. - Manfred Boergens, Aug 02 2023
If x, y are two n-bit binary strings then a(n) gives the number of pairs (x,y) such that XOR(x, y) = ABS(x - y). - Ramasamy Chandramouli, Feb 15 2009
Equals row sums of the triangular version of A038573. - Gary W. Adamson, Jun 04 2009
Inverse binomial transform of A085350. - Paul Curtz, Nov 14 2009
Related to the number of even a's in a nontrivial cycle (should one exist) in the 3x+1 Problem, where a <= floor(log_2(2*(3^n) - 2^n)). The value n correlates to the number of odds in such a nontrivial cycle. See page 1288 of Crandall's paper. Also, this relation gives another proof that the number of odds divided by the number of evens in a nontrivial cycle is bounded by log 2 / log 3 (this observation does not resolve the finite cycles conjecture as the value could be arbitrarily close to this bound). However, the same argument gives that log 2 / log 3 is less than or equal to the number of odds divided by the number of evens in a divergent sequence (should one exist), as log 2 / log 3 is the limit value for a cycle of an arbitrarily large length, where the length is given by the value n. - Jeffrey R. Goodwin, Aug 04 2011
Row sums of Riordan triangle A106516. - Wolfdieter Lang, Jan 09 2015
Number of restricted barred preferential arrangements having 3 bars in which the sections are all restricted sections such that (for fixed sections i and j) section i or section j is empty. - Sithembele Nkonkobe, Oct 12 2015
This is also row 2 of A281891: for n >= 1, when consecutive positive integers are written as a product of primes in nondecreasing order, a factor of 2 or 3 occurs in n-th position a(n) times out of every 6^n. - Peter Munn, May 18 2017
Also row sums of A124929. - Omar E. Pol, Jun 15 2017
This is the sum of A318921(n) for n in the range 2^(k+1) to 2^(k+2)-1. See A318921 for proof. - N. J. A. Sloane, Sep 25 2018
a(n) is also the number of acyclic orientations of the complete bipartite graph K_{2,n}. - Vincent Pilaud, Sep 15 2020
a(n-1) is also the number of n-digit numbers whose largest decimal digit is 2. - Stefano Spezia, Nov 15 2023

References

  • Leonhard Euler, Introductio in analysin infinitorum (1748), section 216.

Crossrefs

Row n = 2 of array A099594.
Also occurs as a row, column, diagonal or as row sums in A038573, A085870, A090888, A106516, A217764, A281891.

Programs

  • Haskell
    a027649 n = a027649_list !! n
    a027649_list = map fst $ iterate (\(u, v) -> (3 * u + v, 2 * v)) (1, 1)
    -- Reinhard Zumkeller, Jun 09 2013
    
  • Magma
    [2*(3^n)-2^n: n in [0..30]]; // Vincenzo Librandi, Jul 17 2011
    
  • Maple
    a(n, k):= (-1)^n*sum( (-1)^'m'*'m'!*Stirling2(n,'m')/('m'+1)^k,'m'=0..n);
    seq(a(n, -2), n=0..30);
  • Mathematica
    Table[2(3^n)-2^n,{n,0,30}] (* or *) LinearRecurrence[ {5,-6},{1,4},31]  (* Harvey P. Dale, Apr 22 2011 *)
  • PARI
    a(n)=2*(3^n)-2^n \\ Charles R Greathouse IV, Jul 16 2011
    
  • PARI
    Vec((1-x)/((1-2*x)*(1-3*x)) + O(x^50)) \\ Altug Alkan, Oct 12 2015
    
  • SageMath
    [2*(3^n - 2^(n-1)) for n in (0..30)] # G. C. Greubel, Aug 01 2022

Formula

G.f.: (1-x)/((1-2*x)*(1-3*x)).
a(n) = 3*a(n-1) + 2^(n-1), with a(0) = 1.
a(n) = Sum_{k=0..n} binomial(n, k)*(2^(k+1) - 1). - Paul Barry, Mar 24 2003
Partial sums of A053581. - Paul Barry, Jun 26 2003
Main diagonal of array (A085870) defined by T(i, 1) = 2^i - 1, T(1, j) = 2^j - 1, T(i, j) = T(i-1, j) + T(i-1, j-1). - Benoit Cloitre, Aug 05 2003
a(n) = A090888(n, 3). - Ross La Haye, Sep 21 2004
a(n) = Sum_{k=0..n} binomial(n+2, k+1)*Sum_{j=0..floor(k/2)} A001045(k-2j). - Paul Barry, Apr 17 2005
a(n) = Sum_{k=0..n} Sum_{j=0..n} binomial(n,j)*binomial(j+1,k+1). - Paul Barry, Sep 18 2006
a(n) = A166060(n+1)/6. - Philippe Deléham, Oct 21 2009
a(n) = 5*a(n-1) - 6*a(n-2), a(0)=1, a(1)=4. - Harvey P. Dale, Apr 22 2011
a(n) = A217764(n,2). - Ross La Haye, Mar 27 2013
For n>0, a(n) = 3 * a(n-1) + 2^(n-1) = 2 * (a(n-1) + 3^(n-1)). - J. Conrad, Oct 29 2015
for n>0, a(n) = 2 * (1 + 2^(n-2) + Sum_{x=1..n-2} Sum_{k=0..x-1} (binomial(x-1,k)*(2^(k+1) + 2^(n-x+k)))). - J. Conrad, Dec 10 2015
E.g.f.: exp(2*x)*(2*exp(x) - 1). - Stefano Spezia, May 18 2024

Extensions

Better formulas from David W. Wilson and Michael Somos
Incorrect formula removed by Charles R Greathouse IV, Mar 18 2010
Duplications (due to corrections to A numbers) removed by Peter Munn, Jun 15 2017

A281889 a(n) is the least integer k such that more than half of all integers are divisible by a product of n integers chosen from 2..k.

Original entry on oeis.org

3, 7, 433, 9257821
Offset: 1

Views

Author

Peter Munn, Feb 01 2017

Keywords

Comments

The n chosen integers need not be distinct.
By "more than half of all integers" we mean more precisely "more than half of the integers in -m..m, for all sufficiently large m (depending on n)", and similarly with 1..m for "more than half of all positive integers".
Equivalently, a(n) is the least prime p such that more than half of all positive integers can be written as a product of primes of which n or more are not greater than p. (In this sense, a(n) might be called the median n-th least prime factor of the integers.)
The number of integers that satisfy the "product of primes" criterion for p = prime(m) is the same in every interval of primorial(m)^n integers and is A281891(m,n). Primorial(m) = A002110(m), product of the first m primes.
a(n) is the least k = prime(m) such that 2 * A281891(m,n) > A002110(m)^n.
a(n) is the least k such that more than half of all positive integers equate to the volume of an orthotope with integral sides at least n of which are orthogonal with length between 2 and k inclusive.
The next term is estimated to be a(5) ~ 3*10^18.

Examples

			For n=1, we have a(1) = 3 since for all m > 1, more than half of the integers in -m..m are divisible by an integer chosen from 2..3, i.e., either 2 or 3. We must have a(1) > 2, because the only integer in 2..2 is 2, but in each interval -2m-1..2m+1, only 2m+1 integers are even, so 2 is not a divisor of more than half of all integers in the precise sense given above.
		

Crossrefs

Other sequences about medians of prime factors: A126282, A126283, A284411, A290154.

A281890 Square array A(n,k): number of integers having prime(n) as k-th factor when written as product of primes in nondecreasing order, in any interval of primorial(n)^k positive integers.

Original entry on oeis.org

1, 1, 1, 1, 5, 2, 1, 19, 62, 8, 1, 65, 1322, 1976, 48, 1, 211, 24182, 318392, 140496, 480, 1, 665, 408842, 42729464, 260656752, 19373280, 5760, 1, 2059, 6609302, 5208402488, 395975417424, 485262187680, 4125121920, 92160, 1, 6305, 103999562, 600582229496
Offset: 1

Views

Author

Peter Munn, Feb 08 2017

Keywords

Comments

Square array read by descending antidiagonals: A(n,k) with rows n >= 1, columns k >= 1. Primorial(n) = A002110(n): product of first n primes.
Visualize the prime factorizations of the positive integers as a table with row headings giving each successive integer, and the primes of which the row heading is the product listed across the columns in nondecreasing order, repeated when necessary. Except for 1, which lacks prime factors, column 1 has the row heading's least prime factor, column 2 has a value for composite numbers but is blank for primes, and so on. This sequence measures precisely how frequently the various primes occur in each column. This is possible because any given prime occurs cyclically in any given column, for the reason following.
The occurrence pattern of up to k factors of prime(n) in such prime factorizations has a fundamental period over the positive integers of prime(n)^k. The least common period for up to k factors of each of the first n primes is Primorial(n)^k, and this covers everything that can affect the occurrence of prime(n) in the least k factors. Thus prime(n) is k-th least prime factor of integer m if and only if it is k-th least prime factor of m+Primorial(n)^k.
Intermediate values in the calculation of this sequence appear in A281891.
A(n,1) = A005867(n-1) in accordance with the comment on A005867 dated Jul 16 2006.
A(2,k) = A001047(k) = 3^k - 2^k.

Examples

			Prime(2)=3 occurs as second least factor five times in the prime factorizations of every interval of 36=Primorial(2)^2 positive integers. See A014673. So A(2,2) = 5.
		

Crossrefs

A079474 re-read as a square array gives values of primorial(n)^k = A002110(n)^k.
The values in the body of the factorization table described in the author's comments are in the irregular array A027746.

Formula

A(n,k) = primorial(n-1) * A281891(n,k-1) - prime(n)^(k-1) * A281891(n-1,k).

A053144 Cototient of the n-th primorial number.

Original entry on oeis.org

1, 4, 22, 162, 1830, 24270, 418350, 8040810, 186597510, 5447823150, 169904387730, 6317118448410, 260105476071210, 11228680258518030, 529602053223499410, 28154196550210460730, 1665532558389396767070
Offset: 1

Views

Author

Labos Elemer, Feb 28 2000

Keywords

Comments

a(n) > A005367(n), a(n) > A002110(n)/2.
Limit_{n->oo} a(n)/A002110(n) = 1 because (in the limit) the quotient is the probability that a randomly selected integer contains at least one of the first n primes in its factorization. - Geoffrey Critzer, Apr 08 2010

Examples

			In the reduced residue system of q(4) = 2*3*5*7 - 210 the number of coprimes to 210 is 48, while a(4) = 210 - 48 = 162 is the number of values divisible by one of the prime factors of q(4).
		

Crossrefs

Cf. A000040 (prime numbers).
Column 1 of A281891.

Programs

  • Mathematica
    Abs[Table[ Total[Table[(-1)^(k + 1)* Total[Apply[Times, Subsets[Table[Prime[n], {n, 1, m}], {k}], 2]], {k, 0, m - 1}]], {m, 1, 22}]] (* Geoffrey Critzer, Apr 08 2010 *)
    Array[# - EulerPhi@ # &@ Product[Prime@ i, {i, #}] &, 17] (* Michael De Vlieger, Feb 17 2019 *)
  • PARI
    a(n) = prod(k=1, n, prime(k)) - prod(k=1, n, prime(k)-1); \\ Michel Marcus, Feb 08 2019

Formula

a(n) = A051953(A002110(n)) = A002110(n) - A005867(n).
a(n) = a(n-1)*A000040(n) + A005867(n-1). - Bob Selcoe, Feb 21 2016
a(n) = (1/A000040(n+1) - A038110(n+1)/A038111(n+1))*A002110(n+1). - Jamie Morken, Feb 08 2019
a(n) = A161527(n)*A002110(n)/A060753(n+1). - Jamie Morken, May 13 2022

A343598 Positive integers k such that exactly half the integers in [1..k] are divisible by a 7-smooth composite number.

Original entry on oeis.org

10, 12, 14, 62, 74, 86, 88, 90, 92, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 126, 128, 130, 132, 136, 138, 140, 154, 156, 172, 174, 178, 180, 182, 184, 186, 188, 194, 202, 204, 208, 210, 212, 246, 248, 250, 252, 256, 258, 260, 262, 264, 266, 268, 270
Offset: 1

Views

Author

Peter Munn, Apr 21 2021

Keywords

Comments

In every interval of 44100 integers, exactly 22164 are divisible by a 7-smooth composite number. 44100 = (2*3*5*7)^2 = A002110(4)^2 and 22164 = A281891(4,2). See A281891 for more details.
The sequence is finite with largest term a(136) = 1406.

Examples

			The numbers divisible by a 7-smooth composite number are given in A343597. List in a row the numbers that are present, with the absent numbers (aligned) in a row below. Where the count of absent numbers matches that of those present, draw a vertical line, such that all the numbers to the left are less than all the numbers to the right. See the figure below, where the rows are segmented for practical reasons:
--------------
Present :   4   6   8   9  10 | 12 | 14 | 15  16  18  20  21
Missing :   1   2   3   5   7 | 11 | 13 | 17  19  22  23  26
----------
Present :  24  25  27  28  30  32  35  36  40  42  44  45  48
Missing :  29  31  33  34  37  38  39  41  43  46  47  51  53
----------
Present :  49  50  52  54  56  60 | 63  64  66  68  70  72 |
Missing :  55  57  58  59  61  62 | 65  67  69  71  73  74 |
----------
  ...
--------------
Listing the largest number to the left of each vertical line gives this sequence: 10, 12, 14, 62, 74, ... .
		

Crossrefs

Programs

  • PARI
    upto(n) = { my(t = 0, res = List()); for(i = 1, n, if(isdivby(i), t++; ); if(2*t == i, listput(res, i))); res }
    isdivby(n) = { my(v = [4, 6, 9, 10, 14, 15, 21, 25, 35, 49]); for(i = 1, #v, if(n%v[i] == 0, return(1))); 0 } \\ David A. Corneth, Apr 24 2021

Formula

{a(n)} = {k : k = 2*m, A343597(m) <= k < A343597(m + 1)}.
Showing 1-5 of 5 results.