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 41-50 of 56 results. Next

A094968 Indices of Fibonacci numbers in Stern's diatomic series A049456 regarded as a single linear sequence.

Original entry on oeis.org

1, 4, 7, 14, 25, 48, 91, 178, 349, 692, 1375, 2742, 5473, 10936, 21859, 43706, 87397, 174780, 349543, 699070, 1398121, 2796224, 5592427, 11184834, 22369645, 44739268, 89478511, 178956998, 357913969, 715827912, 1431655795, 2863311562
Offset: 0

Views

Author

Paul Barry, May 26 2004

Keywords

Comments

By definition, A049456(a(n))=Fib(n+2).
The rank of Fib(n+2) in row n of A049456 (regarded as an irregular triangle read by rows) is A128209(n) = A001045(n)+1. [Comment edited by N. J. A. Sloane, Nov 23 2016]

Crossrefs

Programs

  • PARI
    Vec((1 + x - 4*x^2) / ((1 - x)^2*(1 + x)*(1 - 2*x)) + O(x^30)) \\ Colin Barker, Sep 29 2017

Formula

G.f. : (1+x-4*x^2) / ((1-x)*(1-x^2)*(1-2*x)).
a(n) = 2^n + n + Jacobsthal(n).
a(n) = A006127(n) + A001045(n).
From Colin Barker, Sep 29 2017: (Start)
a(n) = ((-1)^(1+n) + 2^(2+n) + 3*n) / 3.
a(n) = 3*a(n-1) - a(n-2) - 3*a(n-3) + 2*a(n-4) for n>3.
(End)

A097339 2^n+n^3.

Original entry on oeis.org

1, 3, 12, 35, 80, 157, 280, 471, 768, 1241, 2024, 3379, 5824, 10389, 19128, 36143, 69632, 135985, 267976, 531147, 1056576, 2106413, 4204952, 8400775, 16791040, 33570057, 67126440, 134237411, 268457408, 536895301, 1073768824, 2147513439
Offset: 0

Views

Author

Paul Barry, Aug 05 2004

Keywords

Crossrefs

Programs

Formula

G.f. : (1-3x+8x^2-11x^3-x^4)/((1-x)^4(1-2x)).

A100339 Primes of the form 2^q + q where q is not a prime.

Original entry on oeis.org

3, 521, 32783, 549755813927, 37778931862957161709643, 2417851639229258349412433
Offset: 1

Views

Author

Cino Hilliard, Jan 11 2005

Keywords

Comments

The next term is 2^735+735 = 18073..35103, 222 digits long.

Examples

			For q = 9, 2^9+9 = 521 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Table[If[!PrimeQ[n],2^n+n,0],{n,1200}],PrimeQ] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2011*)
  • PARI
    g1(p,n)=for(x=1,n,c=composite(x);y=p^c+c;if(gcd(y,c)==1,if(isprime(y),print1 (y",")))) composite(n) = \ the n-th composite number { local(c,x); c=1; x=0; while(c <= n, x++; if(!isprime(x),c++); ); return(x) }

Formula

a(n) = A006127(A100556(n-1)) for n >= 2. - Amiram Eldar, Jun 30 2024

A111049 Triangle T(n,k), 0 <= k <= n, read by rows, given by [1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] DELTA [1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Original entry on oeis.org

1, 1, 1, 1, 3, 2, 1, 6, 9, 4, 1, 11, 27, 25, 8, 1, 20, 70, 100, 65, 16, 1, 37, 170, 330, 325, 161, 32, 1, 70, 399, 980, 1295, 966, 385, 64, 1, 135, 917, 2723, 4515, 4501, 2695, 897, 128, 1, 264, 2076, 7224, 14406, 17976, 14364, 7176, 2049, 256
Offset: 0

Views

Author

Philippe Deléham, Oct 07 2005

Keywords

Examples

			Rows begin:
  1;
  1,   1;
  1,   3,    2;
  1,   6,    9,    4;
  1,  11,   27,   25,     8;
  1,  20,   70,  100,    65,    16;
  1,  37,  170,  330,   325,   161,    32;
  1,  70,  399,  980,  1295,   966,   385,   64;
  1, 135,  917, 2723,  4515,  4501,  2695,  897,  128;
  1, 264, 2076, 7224, 14406, 17976, 14364, 7176, 2049, 256;
		

Crossrefs

Programs

  • Mathematica
    With[{m = 9}, CoefficientList[CoefficientList[Series[(1 - 2*x - 2*x*y + x^2 *y + x^2*y^2)/(1 - 3*x - 3*x*y + 2*x^2 + 4*x^2*y + 2*x^2*y^2), {x, 0 , m}, {y, 0, m} ], x], y]] // Flatten (* Georg Fischer, Feb 17 2020 *)
  • PARI
    T(n, k) = if (k<=n, 2^(n-1)*binomial(n-1, k-1)+binomial(n-1, k));
    matrix(10, 10, n, k, T(n-1, k-1)) \\ to see the triangle \\ Michel Marcus, Feb 17 2020

Formula

T(n, k) = 2^(n-1)binomial(n-1, k-1) + binomial(n-1, k).
Sum_{k=0..n} T(n, k) = 2^(n-1)*(1+2^(n-1)) = A063376(n-1) for n >= 1.
From Peter Bala, Mar 20 2013: (Start)
O.g.f.: (1 - 2*t + x*t*(t-2) + x^2*t^2)/((1 - t*(1+x))*(1 - 2*t*(1+x))) = 1 + (1+x)*t + (1+3*x+2*x^2)*t^2 + ....
E.g.f.: (x + 2*exp((1+x)*t) + x*exp(2*t*(1+x)))/(2*(1+x)) = 1 + (1+x)*t + (1+3*x+2*x^2)*t^2/2! + ....
Recurrence equation: for n >= 1, T(n+1,k) = 2*T(n,k) + 2*T(n,k-1) - binomial(n,k). (End)
From Philippe Deléham, Oct 18 2013: (Start)
G.f.: (1 - 2*x - 2*x*y + x^2*y + x^2*y^2)/(1 - 3*x - 3*x*y + 2*x^2 + 4*x^2*y + 2*x^2*y^2).
T(n,k) = 3*T(n-1,k) + 3*T(n-1,k-1) - 2*T(n-2,k) - 4*T(n-2,k-1) - 2*T(n-2,k-2), T(0,0) = T(1,1) = T(1,0) = T(2,0) = 1, T(2,1) = 3, T(2,2) = 2, T(n,k) = 0 if k > n or if k < 0. (End)

Extensions

Wrong a(42) removed by Georg Fischer, Feb 17 2020

A131897 A130321 + A131821 - A000012.

Original entry on oeis.org

1, 3, 2, 6, 2, 3, 11, 4, 2, 4, 20, 8, 4, 2, 5, 37, 16, 8, 4, 2, 6, 70, 32, 16, 8, 4, 2, 7, 135, 64, 32, 16, 8, 4, 2, 8, 264, 128, 64, 32, 16, 8, 4, 2, 9, 521, 256, 128, 64, 32, 16, 8, 4, 2, 10
Offset: 0

Views

Author

Gary W. Adamson, Jul 25 2007

Keywords

Comments

Left column = A006127: (1, 3, 6, 11, 20, 37, ...).
Row sums = A131898: (1, 5, 11, 21, 39, 73, ...).

Examples

			First few rows of the triangle:
   1;
   3,  2;
   6,  2,  3;
  11,  4,  2,  4;
  20,  8,  4,  2,  5;
  37, 16,  8,  4,  2,  6;
  70, 32, 16,  8,  4,  2,  7;
  ...
		

Crossrefs

Formula

A131321 + A131821 - A000012 as infinite lower triangular matrices.

A133545 (A000012 * A007318 - A007318 * A000012) - A000012.

Original entry on oeis.org

1, 3, 1, 6, 5, 1, 11, 12, 7, 1, 20, 24, 20, 9, 1, 37, 45, 45, 30, 11, 1, 70, 83, 91, 76, 42, 13, 1, 135, 154, 175, 168, 119, 56, 15, 1, 264, 290, 330, 344, 288, 176, 72, 17, 1, 521, 555, 621, 675, 633, 465, 249, 90, 19, 1
Offset: 1

Views

Author

Gary W. Adamson, Sep 15 2007

Keywords

Comments

Row sums = A133546: (1, 4, 12, 31, 74, 169, ...).
Left border = A006127: (1, 3, 6, 11, 20, ...).

Examples

			First few rows of the triangle:
   1;
   3,  1;
   6,  5,  1;
  11, 12,  7,  1;
  20, 24, 20,  9,  1;
  37, 45, 45, 30, 11,  1;
  70, 83, 91, 76, 42, 13,  1;
  ...
		

Crossrefs

Formula

(A000012 * A007318 - A007318 * A000012) - A000012 as infinite lower triangular matrices.

A337455 Numbers of the form m + bigomega(m) with m a positive integer.

Original entry on oeis.org

1, 3, 4, 6, 8, 11, 12, 14, 15, 16, 17, 18, 20, 21, 23, 24, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 44, 45, 47, 48, 51, 53, 54, 55, 57, 58, 59, 60, 62, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 84, 85, 87, 88, 89, 90, 92, 93
Offset: 1

Views

Author

Nathan J. McDougall, Aug 27 2020

Keywords

Comments

If a(n) = m + A001222(m) then (a(n) - m) <= log(a(n))/log(2).
It appears that a(n)/n may converge to a constant around ~ 1.49.

Examples

			a(7) = 10 + A001222(10) = 10 + 2 = 12
		

Crossrefs

Cf. A001222 (bigomega), A064800, A358973.
Numbers of the form k^n+n where k is prime are subsequences: A006127 (k=2), A104743 (k=3), A104745 (k=5), A226199 (k=7), A226737 (k=11).
Subsequences include A008864, A101340, and A160649 (excluding the first term).

Programs

  • Mathematica
    m = 100; Select[Union @ Table[n + PrimeOmega[n], {n, 1, m}], # <= m &] (* Amiram Eldar, Aug 28 2020 *)
  • PARI
    upto(limit)=Set(select(t->t<=limit, apply(m->m+bigomega(m), [1..limit]))) \\ Andrew Howroyd, Aug 27 2020
    
  • PARI
    list(lim)=my(v=List()); forfactored(n=1, lim\1-1, my(t=n[1]+bigomega(n)); if(t<=lim, listput(v, t))); Set(v) \\ Charles R Greathouse IV, Dec 07 2022

Formula

Kucheriaviy proves that a(n) << n log log n and conjectures that a(n) ≍ n, that is, these numbers have positive lower density. - Charles R Greathouse IV, Dec 07 2022

A351911 a(n) is the least integer m such that every m-element subset of {1,2,3,...,n} contains two nonempty and disjoint subsets whose sums are equal.

Original entry on oeis.org

3, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 3

Views

Author

Thomas King, Feb 25 2022

Keywords

Comments

a(n) grows like log n. Proof: The set of powers of 2 in {1,2,3,...,n} cannot contain two (nonempty) disjoint subsets with the same sum due to binary representation being unique, hence 1+log_2(n) < a(n). Let N be the least integer such that Sum_{i=0..N-1} (n-i) < 2^N-1. Then by the pigeonhole principle, we have a(n) <= N because the range of possible sums (for nonempty subsets of an N-element set) is at most Sum_{i=0..N-1} (n-i) and there are 2^N-1 nonempty subsets in total. Also N is O(log n).
Note that if we have two (distinct) subsets whose sums agree, then we can remove the integers in the intersection from both sets to get two disjoint (and nonempty) subsets with the same sum.
Also note that a 0-, 1- or 2-element subset cannot have (nonempty) disjoint subsets with the same sum.
The sequence of run lengths starts 1, 3, 6, 11, ... could this be A006127?

Examples

			For n=3 we only have to check the subset {1,2,3} for which 1+2 = 3, and therefore a(3) = 3.
For n=4 we first check the 3-element subsets,
  {1,2,3} : 1+2 = 3
  {1,3,4} : 1+3 = 4
  {1,2,4} : Fail.
So we check the only 4-element subset {1,2,3,4} for which 1+2 = 3, and therefore a(4) = 4.
		

Crossrefs

Cf. A006127.

Programs

  • Python
    # See Thomas King link.

A359685 Greatest prime dividing 2^n + n.

Original entry on oeis.org

3, 3, 11, 5, 37, 7, 5, 11, 521, 47, 71, 79, 547, 911, 32783, 241, 307, 6899, 24967, 87383, 457, 4799, 270601, 7109, 3728273, 12497, 1201, 100613, 2017, 17318417, 859, 87211, 47491, 8589934609, 195329, 1483453, 320370521, 8191129, 549755813927, 478881371
Offset: 1

Views

Author

Philippe Deléham, Jan 11 2023

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> max(numtheory[factorset](2^n+n)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Jan 11 2023
  • Mathematica
    a[n_] := FactorInteger[2^n + n][[-1, 1]]; Array[a, 40] (* Amiram Eldar, Mar 30 2023 *)
  • PARI
    a(n) = vecmax(factor(2^n+n)[,1]); \\ Michel Marcus, Jan 11 2023
    
  • Python
    from sympy import primefactors
    def A359685(n): return max(primefactors((1<Chai Wah Wu, Jan 11 2023

Formula

a(n) = A006530(A006127(n)).

A359735 Let f(s,n) = 2^n + s*n, with s in {-1, 1}. Let c be the number of primes out of the pair f(-1,n), f(1,n). If only f(-1,n) is prime, a(n) = -1, otherwise a(n) = c.

Original entry on oeis.org

0, 1, -1, 2, 0, 1, 0, 0, 0, 2, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Jean-Marc Rebert, Jan 12 2023

Keywords

Examples

			f(-1,1) = 2^1 - 1 = 1, is not prime and f(1,1) = 2^1 + 1 = 3 is prime, so a(1) = 1.
f(-1,2) = 2^2 - 2 = 2, is prime and f(1,2) = 2^2 + 2 = 6 = 2 * 3 is not prime, so a(2) = -1.
f(-1,3) = 2^3 - 3 = 5, is prime and f(1,3) = 2^3 + 3 = 11 is prime, so a(3) = 2.
		

Crossrefs

Programs

  • PARI
    f(s,n)=2^n+s*n
    a(n)=my(a=isprime(f(-1,n)),b=isprime(f(1,n)),c=a+b); if(c==1&&a==1,return(-1),return(c))

Formula

a(n) can be = 2 only if n = 6*m + 3 for m >= 0 and m is not congruent to {0, 4} mod 5, not congruent to {2, 4} mod 7, not congruent to {6, 7} mod 11 and not congruent to {3, 9} mod 13. Does a(n) = 2 for n > 9 exist? - Thomas Scheuerle, Jan 12 2023
Previous Showing 41-50 of 56 results. Next