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

A195159 Multiples of 7 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 7, 3, 14, 5, 21, 7, 28, 9, 35, 11, 42, 13, 49, 15, 56, 17, 63, 19, 70, 21, 77, 23, 84, 25, 91, 27, 98, 29, 105, 31, 112, 33, 119, 35, 126, 37, 133, 39, 140, 41, 147, 43, 154, 45, 161, 47, 168, 49, 175, 51, 182, 53, 189, 55, 196, 57, 203, 59, 210, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

This is 7*n if n is even, n if n is odd, if n>=0.
Partial sums give the generalized 11-gonal (or hendecagonal) numbers A195160.
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 11-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Cf. A008589 and A005408 interleaved.
Column k=7 of A195151.
Cf. Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, this sequence, A195161.

Programs

Formula

a(2n) = 7n, a(2n+1) = 2n+1. [corrected by Omar E. Pol, Jul 26 2018]
From Bruno Berselli, Sep 14 2011: (Start)
G.f.: x*(1+7*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (5*(-1)^n+9)*n/4.
a(n) + a(n-1) = A056020(n). (End)
Multiplicative with a(2^e) = 7*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 5/2^s). - Amiram Eldar, Oct 25 2023

A195312 Multiples of 9 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 9, 3, 18, 5, 27, 7, 36, 9, 45, 11, 54, 13, 63, 15, 72, 17, 81, 19, 90, 21, 99, 23, 108, 25, 117, 27, 126, 29, 135, 31, 144, 33, 153, 35, 162, 37, 171, 39, 180, 41, 189, 43, 198, 45, 207, 47, 216, 49, 225, 51, 234, 53, 243, 55, 252, 57, 261, 59, 270, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 14 2011

Keywords

Comments

Partial sums give the generalized 13-gonal (or tridecagonal) numbers A195313.
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized 13-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 9 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, A195161, this sequence.

Programs

  • Magma
    /* By definition */ &cat[[9*n,2*n+1]: n in [0..33]]; // Bruno Berselli, Sep 16 2011
    
  • Mathematica
    With[{nn=30},Riffle[9Range[0,nn],Range[1,2nn+1,2]]] (* Harvey P. Dale, Sep 24 2011 *)
  • PARI
    a(n)=(7*(-1)^n+11)*n/4 \\ Charles R Greathouse IV, Oct 07 2015

Formula

From Bruno Berselli, Sep 15 2011: (Start)
G.f.: x*(1+9*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (7*(-1)^n+11)*n/4.
a(n) + a(n-1) = A175885(n).
Sum_{i=0..n} a(i) = A195313(n). (End)
Multiplicative with a(2^e) = 9*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 7/2^s). - Amiram Eldar, Oct 25 2023
E.g.f.: x*(cosh(x) + 9*sinh(x)/2). - Stefano Spezia, Jun 12 2025

A298036 Coordination sequence of Dual(4.6.12) tiling with respect to a 12-valent node.

Original entry on oeis.org

1, 12, 12, 36, 24, 60, 36, 84, 48, 108, 60, 132, 72, 156, 84, 180, 96, 204, 108, 228, 120, 252, 132, 276, 144, 300, 156, 324, 168, 348, 180, 372, 192, 396, 204, 420, 216, 444, 228, 468, 240, 492, 252, 516, 264, 540, 276, 564, 288, 588, 300
Offset: 0

Views

Author

N. J. A. Sloane, Jan 22 2018

Keywords

Comments

Conjecture: For n>0, a(n)=6n if n even, otherwise 12n.
The conjecture can easily be shown to be true: The vertices at distance 2k consist of 3k 12-valent and 3k 4-alent vertices, and the vertices at distance 2k+1 consist of 6(k+1) 6-valent and 6(k+1) 4-valent vertices. - Charlie Neder, Apr 22 2019

Crossrefs

Cf. A072154, A298037 (partial sums), A298038 (hexavalent node), A298040 (tetravalent node).
Cf. A109043 (a(n)/6), A026741 (a(n)/12).
List of coordination sequences for Laves tilings (or duals of uniform planar nets): [3,3,3,3,3.3] = A008486; [3.3.3.3.6] = A298014, A298015, A298016; [3.3.3.4.4] = A298022, A298024; [3.3.4.3.4] = A008574, A296368; [3.6.3.6] = A298026, A298028; [3.4.6.4] = A298029, A298031, A298033; [3.12.12] = A019557, A298035; [4.4.4.4] = A008574; [4.6.12] = A298036, A298038, A298040; [4.8.8] = A022144, A234275; [6.6.6] = A008458.

Programs

  • Mathematica
    LinearRecurrence[{0, 2, 0, -1}, {1, 12, 12, 36, 24}, 100] (* Paolo Xausa, Jul 19 2024 *)

Formula

From Charlie Neder, Apr 22 2019: (Start)
a(n) = 6 * n * (1 + n mod 2), n > 0.
G.f.: (1 + 12*x + 10*x^2 + 12*x^3 + x^4)/(1 - x^2)^2. (End)

Extensions

a(7)-a(50) from Charlie Neder, Apr 22 2019

A051714 Numerators of table a(n,k) read by antidiagonals: a(0,k) = 1/(k+1), a(n+1,k) = (k+1)*(a(n,k) - a(n,k+1)), n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 3, 1, -1, 1, 1, 2, 1, -1, 0, 1, 1, 5, 2, -3, -1, 1, 1, 1, 3, 5, -1, -1, 1, 0, 1, 1, 7, 5, 0, -4, 1, 1, -1, 1, 1, 4, 7, 1, -1, -1, 1, -1, 0, 1, 1, 9, 28, 49, -29, -5, 8, 1, -5, 5, 1, 1, 5, 3, 8, -7, -9, 5, 7, -5, 5, 0, 1, 1, 11, 15, 27, -28, -343, 295, 200, -44, -1017, 691, -691
Offset: 0

Views

Author

Keywords

Comments

Leading column gives the Bernoulli numbers A164555/A027642. - corrected by Paul Curtz, Apr 17 2014

Examples

			Table begins:
   1     1/2   1/3    1/4   1/5  1/6  1/7 ...
   1/2   1/3   1/4    1/5   1/6  1/7 ...
   1/6   1/6   3/20   2/15  5/42 ...
   0     1/30  1/20   2/35  5/84 ...
  -1/30 -1/30 -3/140 -1/105 ...
Antidiagonals of numerator(a(n,k)):
  1;
  1,  1;
  1,  1,  1;
  1,  1,  1,  0;
  1,  1,  3,  1, -1;
  1,  1,  2,  1, -1,   0;
  1,  1,  5,  2, -3,  -1,  1;
  1,  1,  3,  5, -1,  -1,  1,  0;
  1,  1,  7,  5,  0,  -4,  1,  1, -1;
  1,  1,  4,  7,  1,  -1, -1,  1, -1,  0;
  1,  1,  9, 28, 49, -29, -5,  8,  1, -5,  5;
		

Crossrefs

Denominators are in A051715.

Programs

  • Magma
    function a(n,k)
      if n eq 0 then return 1/(k+1);
      else return (k+1)*(a(n-1,k) - a(n-1,k+1));
      end if;
    end function;
    A051714:= func< n,k | Numerator(a(n,k)) >;
    [A051714(k,n-k): k in [0..n], n in [0..15]]; // G. C. Greubel, Apr 22 2023
    
  • Maple
    a:= proc(n,k) option remember;
          `if`(n=0, 1/(k+1), (k+1)*(a(n-1,k)-a(n-1,k+1)))
        end:
    seq(seq(numer(a(n, d-n)), n=0..d), d=0..12); # Alois P. Heinz, Apr 17 2013
  • Mathematica
    nmax = 12; a[0, k_]:= 1/(k+1); a[n_, k_]:= a[n, k]= (k+1)(a[n-1, k]-a[n-1, k+1]); Numerator[Flatten[Table[a[n-k, k], {n,0,nmax}, {k, n, 0, -1}]]] (* Jean-François Alcover, Nov 28 2011 *)
  • SageMath
    def a(n,k):
        if (n==0): return 1/(k+1)
        else: return (k+1)*(a(n-1, k) - a(n-1, k+1))
    def A051714(n,k): return numerator(a(n, k))
    flatten([[A051714(k, n-k) for k in range(n+1)] for n in range(16)]) # G. C. Greubel, Apr 22 2023

Formula

From Fabián Pereyra, Jan 14 2023: (Start)
a(n,k) = numerator(Sum_{j=0..n} (-1)^(n-j)*j!*Stirling2(n,j)/(j+k+1)).
E.g.f.: A(x,t) = (x+log(1-t))/(1-t-exp(-x)) = (1+(1/2)*x+(1/6)*x^2/2!-(1/30)*x^4/4!+...)*1 + (1/2+(1/3)*x+(1/6)*x^2/2!+...)*t + (1/3+(1/4)*x+(3/20)*x^2/2!+...)*t^2 + .... (End)

Extensions

More terms from James Sellers, Dec 07 1999

A298026 Coordination sequence of Dual(3.6.3.6) tiling with respect to a hexavalent node.

Original entry on oeis.org

1, 6, 6, 18, 12, 30, 18, 42, 24, 54, 30, 66, 36, 78, 42, 90, 48, 102, 54, 114, 60, 126, 66, 138, 72, 150, 78, 162, 84, 174, 90, 186, 96, 198, 102, 210, 108, 222, 114, 234, 120, 246, 126, 258, 132, 270, 138, 282, 144, 294, 150, 306, 156, 318, 162, 330, 168, 342, 174, 354, 180, 366, 186, 378, 192, 390
Offset: 0

Views

Author

N. J. A. Sloane, Jan 21 2018

Keywords

Comments

Also known as the kgd net.
This is one of the Laves tilings.

Crossrefs

Cf. A008579, A298027 (partial sums), A298028 (trivalent point).
List of coordination sequences for Laves tilings (or duals of uniform planar nets): [3,3,3,3,3.3] = A008486; [3.3.3.3.6] = A298014, A298015, A298016; [3.3.3.4.4] = A298022, A298024; [3.3.4.3.4] = A008574, A296368; [3.6.3.6] = A298026, A298028; [3.4.6.4] = A298029, A298031, A298033; [3.12.12] = A019557, A298035; [4.4.4.4] = A008574; [4.6.12] = A298036, A298038, A298040; [4.8.8] = A022144, A234275; [6.6.6] = A008458.

Programs

  • Maple
    f6:=proc(n) if n=0 then 1 elif (n mod 2) = 0 then 3*n else 6*n; fi; end;
    [seq(f6(n),n=0..80)];
  • Mathematica
    Join[{1}, LinearRecurrence[{0, 2, 0, -1}, {6, 6, 18, 12}, 80]] (* Jean-François Alcover, Mar 23 2020 *)
  • PARI
    Vec((1 + 6*x + 4*x^2 + 6*x^3 + x^4) / ((1 - x)^2*(1 + x)^2) + O(x^60)) \\ Colin Barker, Jan 22 2018

Formula

a(0)=1; a(2*k)=6*k, a(2*k+1)=12*k+6.
G.f.: 1 + 6*x*(1+x+x^2)/(1-x^2)^2. - Robert Israel, Jan 21 2018
From Colin Barker, Jan 22 2018: (Start)
a(n) = 3*n for n>0 and even.
a(n) = 6*n for n odd.
a(n) = 2*a(n-2) - a(n-4) for n>4.
(End)
a(n) = 6*A026741(n), n>0. - R. J. Mathar, Jan 29 2018

A336547 Numbers k such that for 1 <= i < j <= h, all sigma(p_i^e_i), sigma(p_j^e_j) are pairwise coprime, when k = p_1^e_1 * ... * p_h^e_h, where each p_i^e_i is the maximal power of prime p_i dividing k.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 20, 23, 24, 25, 26, 27, 28, 29, 31, 32, 36, 37, 38, 41, 43, 44, 45, 47, 48, 49, 50, 53, 54, 56, 59, 61, 62, 63, 64, 67, 68, 71, 72, 73, 74, 75, 76, 79, 80, 81, 83, 86, 89, 92, 96, 97, 99, 100, 101, 103, 104, 107, 108, 109, 112, 113, 116, 117, 121, 122, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Jul 25 2020

Keywords

Comments

Numbers k such that A051027(k) = Product_{p^e||k} A051027(p^e) = A353802(n). Here each p^e is the maximal prime power divisor of k, and A051027(k) = sigma(sigma(k)). Numbers at which points A051027 appears to be multiplicative.
Proof that this interpretation is equal to the main definition:
(1) If none of sigma(p_1^e_1), ..., sigma(p_k^e_k) share prime factors, then A051027(k) = sigma(sigma(p_1^e_1) * ... * sigma(p_k^e_k)) = A051027(p_1^e_1) * ... * A051027(p_k^e_k), by multiplicativity of sigma.
(2) On the other hand, if say, gcd(sigma(p_i^e_i), sigma(p_j^e_j)) = c > 1 for some distinct i, j, then that c has at least one prime factor q, with product t = sigma(p_1^e_1) * ... * sigma(p_k^e_k) having a divisor of the form q^v (where v = valuation(t,q)), and the same prime factor q occurs as a divisor in more than one of the sigma(p_i^e_j), in the form q^k, with the exponents summing to v, then it is impossible to form sigma(q^v) = (1 + q + q^2 + ... + q^v) as a product of some sigma(q^k_1) * ... * sigma(q^k_z), i.e., as a product of (1 + q + ... + q^k_1) * ... * (1 + q + ... + q^k_z), with v = k_1 + ... + k_z, because such a product is always larger than (1 + q + ... + q^v). And if there are more such cases of "split primes", then each of them brings its own share to this monotonic inequivalence, thus Product_{p^e|n} A051027(p^e) = A353802(n) >= A051027(n), for all n.
From Antti Karttunen, May 07 2022: (Start)
Also numbers k such that A062401(k) = phi(sigma(n)) = Product_{p^e||k} A062401(p^e) = A353752(n).
Proof that also this interpretation is equal to the main definition:
(1) like in (1) above, if none of sigma(p_1^e_1), ..., sigma(p_k^e_k) share prime factors, then by the multiplicativity of phi.
(2) On the other hand, if say, gcd(sigma(p_i^e_i), sigma(p_j^e_j)) = c > 1 for some distinct i, j, then that c must have a prime factor q occurring in both sigma(p_i^e_i) and sigma(p_j^e_j), with say q^x being the highest power of q in the former, and q^y in the latter. Then phi(q^x)*phi(q^y) < phi(q^(x+y)), i.e. here the inequivalence acts to the opposite direction than with sigma(sigma(...)), so we have A353752(n) <= A062401(n) for all n.
(End)
From Antti Karttunen, May 22 2022: (Start)
All even perfect numbers (even terms of A000396) are included in this sequence. In general, for any perfect number n in this sequence, map k -> A026741(sigma(k)) induces on its unitary prime power divisors (p^e||n) a permutation that is a single cycle, mapping each one of them to the next larger one, except that the largest is mapped to the smallest one. Therefore, for a hypothetical odd perfect number n = x*a*b*c*d*e*f*g*h to be included in this sequence, where x is Euler's special factor of the form (4k+1)^(4h+1), and a .. h are even powers of odd primes (of which there are at least eight distinct ones, see P. P. Nielsen reference in A228058), further constraints are imposed on it: (1) that h < x < 2*a (here assuming that a, b, c, ..., g, h have already been sorted by their size, thus we have a < b < ... < g < h < x < 2*a, and (2), that we must also have sigma(a) = b, sigma(b) = c, ..., sigma(f) = g, sigma(h) = x, and sigma(x) = 2*a. Note that of the 400 initial terms of A008848, only its second term 81 is a prime power, so empirically this seems highly unlikely to ever happen.
(End)

Examples

			28 = 2^2 * 7 is present, as sigma(2^2) = 7 and sigma(7) = 8, and 7 and 8 are relatively prime (do not share prime factors). Likewise for all even terms of A000396. - _Antti Karttunen_, May 09 2022
		

Crossrefs

Cf. A051027, A062401, A336546 (characteristic function), A336548 (complement).
Positions of zeros in A336562, in A353753, and in A353803.
Positions of ones in A353755, in A353784, and in A353806.
Union of A000961 and A336549.
Subsequence of A336358 and of A336557.

Programs

Formula

{k | A336562(k) == 0}. - Antti Karttunen, May 09 2022

Extensions

The old definition moved to comments and replaced with an alternative definition from the comment section by Antti Karttunen, May 07 2022

A106608 a(n) = numerator of n/(n+7).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16, 17, 18, 19, 20, 3, 22, 23, 24, 25, 26, 27, 4, 29, 30, 31, 32, 33, 34, 5, 36, 37, 38, 39, 40, 41, 6, 43, 44, 45, 46, 47, 48, 7, 50, 51, 52, 53, 54, 55, 8, 57, 58, 59, 60, 61, 62, 9, 64, 65, 66, 67, 68, 69, 10, 71, 72, 73, 74, 75, 76
Offset: 0

Views

Author

N. J. A. Sloane, May 15 2005

Keywords

Comments

In general, the numerators of n/(n+p) for prime p and n >= 0 form a sequence with the g.f.: x/(1-x)^2 - (p-1)*x^p/(1-x^p)^2. - Paul D. Hanna, Jul 27 2005
Generalizing the above comment of Hanna, the numerators of n/(n + k) for a fixed positive integer k and n >= 0 form a sequence with the g.f.: Sum_{d divides k} f(d)*x^d/(1 - x^d)^2, where f(n) is the Dirichlet inverse of the Euler totient function A000010. f(n) is a multiplicative function defined on prime powers p^k by f(p^k) = 1 - p. See A023900. - Peter Bala, Feb 17 2019
a(n) <> n iff n = 7 * k, in this case, a(n) = k. - Bernard Schott, Feb 19 2019

Crossrefs

Sequences given by the formula numerator(n/(n + k)): A026741 (k = 2), A051176 (k = 3), A060819 (k = 4), A060791 (k = 5), A060789 (k = 6), A106609 thru A106612 (k = 8 thru 11), A051724 (k = 12), A106614 thru A106621 (k = 13 thru 20).

Programs

Formula

G.f.: x/(1-x)^2 - 6*x^7/(1-x^7)^2. - Paul D. Hanna, Jul 27 2005
From R. J. Mathar, Apr 18 2011: (Start)
a(n) = A109048(n)/7.
Dirichlet g.f.: zeta(s-1)*(1-6/7^s).
Multiplicative with a(p^e) = p^e if p<>7, a(7^e) = 7^(e-1) if e > 0. (End)
Sum_{k=1..n} a(k) ~ (43/98) * n^2. - Amiram Eldar, Nov 25 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = 13*log(2)/7. - Amiram Eldar, Sep 08 2023

A109007 a(n) = gcd(n,3).

Original entry on oeis.org

3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1, 1, 3, 1
Offset: 0

Views

Author

Keywords

Comments

For n>1: a(n) = GCD of the n-th and (n+2)-th triangular numbers = A050873(A000217(n+2), A000217(n)). - Reinhard Zumkeller, May 28 2007
From Klaus Brockhaus, May 24 2010: (Start)
Continued fraction expansion of (3+sqrt(17))/2.
Decimal expansion of 311/999. (End)

Crossrefs

Cf. A178255 (decimal expansion of (3+sqrt(17))/2). - Klaus Brockhaus, May 24 2010

Programs

Formula

a(n) = 1 + 2*[3|n] = 1 + 2(1 + 2*cos(2*n*Pi/3))/3, where [x|y] = 1 when x divides y, 0 otherwise.
a(n) = a(n-3) for n>2.
Multiplicative with a(p^e, 3) = gcd(p^e, 3). - David W. Wilson, Jun 12 2005
O.g.f.: -(3+x+x^2)/((x-1)*(x^2+x+1)). - R. J. Mathar, Nov 24 2007
Dirichlet g.f. zeta(s)*(1+2/3^s). - R. J. Mathar, Apr 08 2011
a(n) = 2*floor(((n-1) mod 3)/2) + 1. - Gary Detlefs, Dec 28 2011
a(n) = 3^(1 - sgn(n mod 3)). - Wesley Ivan Hurt, Jul 24 2016
a(n) = 3/(1 + 2*((n^2) mod 3)). - Timothy Hopper, Feb 25 2017
a(n) = (5 + 4*cos(2*n*Pi/3))/3. - Wesley Ivan Hurt, Oct 04 2018

A109043 a(n) = lcm(n,2).

Original entry on oeis.org

0, 2, 2, 6, 4, 10, 6, 14, 8, 18, 10, 22, 12, 26, 14, 30, 16, 34, 18, 38, 20, 42, 22, 46, 24, 50, 26, 54, 28, 58, 30, 62, 32, 66, 34, 70, 36, 74, 38, 78, 40, 82, 42, 86, 44, 90, 46, 94, 48, 98, 50, 102, 52, 106, 54, 110, 56, 114, 58, 118, 60, 122, 62, 126, 64, 130, 66, 134
Offset: 0

Views

Author

Mitch Harris, Jun 18 2005

Keywords

Comments

Exponent of the dihedral group D(2n) = . - Arkadiusz Wesolowski, Sep 10 2013
Second column of table A210530. - Boris Putievskiy, Jan 29 2013
For n > 1, the basic period of A000166(k) (mod n) (Miska, 2016). - Amiram Eldar, Mar 03 2021

Crossrefs

Cf. A000166, A109042, A152749 (partial sums).
Cf. A066043 (essentially the same), A000034 (=a(n)/n), A026741 (=a(n)/2).

Programs

Formula

For n > 0: a(n) = A186421(n) + A186421(n+2).
a(n) = n*2 / gcd(n, 2).
a(n) = -(n*((-1)^n-3))/2. - Stephen Crowley, Feb 11 2007
From R. J. Mathar, Aug 20 2008: (Start)
a(n) = A066043(n), n > 1.
a(n) = 2*A026741(n).
G.f.: 2*x(1+x+x^2)/((1-x)^2*(1+x)^2). (End)
a(n) = n*A000034(n). - Paul Curtz, Mar 25 2011
E.g.f.: x*(2*cosh(x) + sinh(x)). - Stefano Spezia, May 09 2021
Sum_{k=1..n} a(k) ~ (3/4) * n^2. - Amiram Eldar, Nov 26 2022

A001751 Primes together with primes multiplied by 2.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 10, 11, 13, 14, 17, 19, 22, 23, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 53, 58, 59, 61, 62, 67, 71, 73, 74, 79, 82, 83, 86, 89, 94, 97, 101, 103, 106, 107, 109, 113, 118, 122, 127, 131, 134, 137, 139, 142, 146, 149, 151, 157, 158, 163, 166
Offset: 1

Views

Author

Keywords

Comments

For n > 1, a(n) is position of primes in A026741.
For n > 1, a(n) is the position of the ones in A046079. - Ant King, Jan 29 2011
A251561(a(n)) != a(n). - Reinhard Zumkeller, Dec 27 2014
Number of terms <= n is pi(n) + pi(n/2). - Robert G. Wilson v, Aug 04 2017
Number of terms <=10^k: 7, 40, 263, 1898, 14725, 120036, 1013092, 8762589, 77203401, 690006734, 6237709391, 56916048160, 523357198488, 4843865515369, ..., . - Robert G. Wilson v, Aug 04 2017
Complement of A264828. - Chai Wah Wu, Oct 17 2024

Crossrefs

Union of A001747 and A000040.
Subsequence of A039698 and of A033948.

Programs

  • Haskell
    a001751 n = a001751_list !! (n-1)
    a001751_list = 2 : filter (\n -> (a010051 $ div n $ gcd 2 n) == 1) [1..]
    -- Reinhard Zumkeller, Jun 20 2011 (corrected, improved), Dec 17 2010
    
  • Mathematica
    Select[Range[163], Or[PrimeQ[#], PrimeQ[1/2 #]] &] (* Ant King, Jan 29 2011 *)
    upto=200;With[{pr=Prime[Range[PrimePi[upto]]]},Select[Sort[Join[pr,2pr]],# <= upto&]] (* Harvey P. Dale, Sep 23 2014 *)
  • PARI
    isA001751(n)=isprime(n/gcd(n,2)) || n==2
    
  • PARI
    list(lim)=vecsort(concat(primes(primepi(lim)), 2* primes(primepi(lim\2)))) \\ Charles R Greathouse IV, Oct 31 2012
    
  • Python
    from sympy import primepi
    def A001751(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-primepi(x)-primepi(x>>1))
        return bisection(f,n,n) # Chai Wah Wu, Oct 17 2024
Previous Showing 41-50 of 205 results. Next