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

A209328 Decimal expansion of the sum of the inverse twin prime products.

Original entry on oeis.org

1, 0, 7, 9, 8, 3, 9, 7, 4, 9, 5
Offset: 0

Views

Author

R. J. Mathar, Jan 19 2013

Keywords

Comments

Summation up to the lesser prime(100000) gives 0.1079839703839.., summation up to the lesser prime(5000000) gives 0.10798397490956.. and summation up to the lesser prime(100000000) gives 0.107983974949..
The constant splits Brun's constant B=A065421 into two portions: define L=Sum_{n>=1} 1/A001359(n) and U=Sum_{n>=1} 1/A006512(n). Then B=U+L and this constant here = (L-U)/2. This leads to the estimates L=1.059064 and U=0.843096. - R. J. Mathar, Feb 05 2013

Examples

			0.10798397495... = 1/(3*5) + 1/(5*7) + 1/(11*13) + .. = Sum_{n>=1} 1/A037074(n).
		

Crossrefs

A071142 Numbers of the form 2*p*q where (p,q) is a twin prime pair.

Original entry on oeis.org

30, 70, 286, 646, 1798, 3526, 7198, 10366, 20806, 23326, 38086, 44998, 64798, 73726, 78406, 103966, 115198, 145798, 159046, 194686, 242206, 352798, 373246, 426886, 544966, 649798, 719998, 763846, 824326, 871198, 1312198, 1351366, 1371166, 1472326, 1555846
Offset: 1

Views

Author

Labos Elemer, May 13 2002

Keywords

Comments

For each term k, A008472(k)/A006530(k) = (2+p+q)/q = (q+q)/q = 2.

Examples

			a(1) = 2 * (product of 1st twin prime pair) = 2*3*5 = 30.
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] sb[x_] := Apply[Plus, ba[x]] ma[x_] := Part[Reverse[Flatten[FactorInteger[x]]], 2] amo[x_] := Abs[MoebiusMu[x]] Do[s=sb[n]/ma[n]; If[IntegerQ[s]&&Equal[lf[n], 3]&& !Equal[amo[n], 0], Print[{n, ba[n]}]], {n, 2, 1000000}]

Formula

a(n) = 2*A037074(n).

Extensions

Edited by Jon E. Schoenfield, Sep 30 2023

A136016 a(n) = 9*n^2-1.

Original entry on oeis.org

8, 35, 80, 143, 224, 323, 440, 575, 728, 899, 1088, 1295, 1520, 1763, 2024, 2303, 2600, 2915, 3248, 3599, 3968, 4355, 4760, 5183, 5624, 6083, 6560, 7055, 7568, 8099, 8648, 9215, 9800, 10403, 11024, 11663, 12320, 12995, 13688, 14399, 15128, 15875, 16640
Offset: 1

Views

Author

Artur Jasinski, Dec 10 2007

Keywords

Crossrefs

Programs

Formula

a(n) = A005563(3*n-1). - Paul Curtz, Oct 28 2008
a(2*n) = A136017(n). - Paul Curtz, Sep 30 2008
a(n) = A016777(n)*A016789(n-1). - Reinhard Zumkeller, Feb 15 2009
G.f.: x*(-8-11*x+x^2) / ( x-1 )^3. - R. J. Mathar, Jul 01 2011
From Amiram Eldar, Jul 31 2020: (Start)
Sum_{n>=1} 1/a(n) = 1/2 - sqrt(3)*Pi/18.
Sum_{n>=1} (-1)^(n+1)/a(n) = sqrt(3)*Pi/9 - 1/2. (End)
From Amiram Eldar, Feb 04 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = 2*Pi/(3*sqrt(3)) (A248897).
Product_{n>=1} (1 - 1/a(n)) = sqrt(2/3)*sin(sqrt(2)*Pi/3). (End)
a(n) = a(-n) for all n in Z. Sum_{n in Z} 1/a(n) = -Pi/3^(3/2) = -A073010. - Michael Somos, May 21 2023
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Wesley Ivan Hurt, Jun 19 2025

A210503 Numbers k that form a primitive Pythagorean triple with k' and sqrt(k^2 + k'^2), where k' is the arithmetic derivative of k.

Original entry on oeis.org

15, 35, 143, 323, 899, 1763, 3599, 4641, 5183, 10403, 11663, 13585, 19043, 22499, 32399, 35581, 36863, 39203, 51983, 57599, 72899, 79523, 97343, 121103, 176399, 186623, 213443, 272483, 324899, 359999, 381923, 412163, 435599, 446641, 622081, 656099, 675683
Offset: 1

Views

Author

Paolo P. Lava, Jan 25 2013

Keywords

Comments

A037074 is a subsequence of this sequence.
If k is the product of a pair of twin primes we have k=p(p+2), k'=2(p+1) and sqrt(k^2+k'^2)=(p+1)^2+1=p(p+2)+2=k+2. These numbers are relatively prime and therefore they form a primitive Pythagorean triple.
Also in the sequence are the following numbers with four distinct prime factors:
4641 = 3*7*13*17 [form p(p+4)*q(q+4)],
13585 = 5*11*13*19 [form p(p+6)*q(q+6)],
35581 = 7*13*17*23 [form p(p+6)*q(q+6)],
446641 = 13*17*43*47 [form p(p+4)*q(q+4)],
622081 = 17*23*37*43 [form p(p+6)*q(q+6)],
700321 = 19*29*31*41 [form p(p+10)*q(q+10)],
From Ray Chandler, Jan 25 2017: (Start)
24887581 = 47*53*97*103 [form p(p+6)*q(q+6)],
43518577 = 59*67*101*109 [form p(p+8)*q(q+8)],
115539901 = 83*97*113*127 [form p(p+14)*q(q+14)],
158682817 = 89*101*127*139 [form p(p+12)*q(q+12)],
305162941 = 103*113*157*167 [form p(p+10)*q(q+10)],
1093514641 = 103*107*313*317 [form p(p+4)*q(q+4)],
1415940061 = 167*193*197*223 [form p(p+26)*q(q+26)].
And one term with six distinct prime factors:
650344079 = 7*11*37*53*59*73. (End)

Examples

			m=57599, m'=480, sqrt(57599^2 + 480^2) = 57601.
		

Crossrefs

Programs

  • Maple
    with(numtheory);
    A210503:= proc(q)
    local a,n,p;
    for n from 1 to q do
      a:=n*add(op(2,p)/op(1,p),p=ifactors(n)[2]);
      if trunc(sqrt(n^2+a^2))=sqrt(n^2+a^2) and gcd(n,gcd(a,n^2+a^2))=1 then print(n); fi;
    od; end:
    A210503(100000);
  • Python
    from math import sqrt
    from sympy import factorint
    from gmpy2 import mpz, is_square, gcd
    A210503 = []
    for n in range(2, 10**5):
        nd = sum([mpz(n*e/p) for p, e in factorint(n).items()])
        if is_square(nd**2+n**2) and gcd(gcd(n, nd), mpz(sqrt(nd**2+n**2))) == 1:
            A210503.append(n) # Chai Wah Wu, Aug 21 2014

A322362 a(n) = gcd(n, A166590(n)), where A166590 is completely multiplicative with a(p) = p+2 for prime p.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 5, 16, 1, 2, 1, 4, 3, 2, 1, 8, 1, 2, 1, 4, 1, 10, 1, 32, 1, 2, 7, 4, 1, 2, 3, 8, 1, 6, 1, 4, 5, 2, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 20, 1, 2, 9, 64, 5, 2, 1, 4, 1, 14, 1, 8, 1, 2, 5, 4, 1, 6, 1, 16, 1, 2, 1, 12, 1, 2, 1, 8, 1, 10, 1, 4, 3, 2, 1, 32, 1, 2, 1, 4, 1, 2, 1, 8, 105
Offset: 1

Views

Author

Antti Karttunen, Dec 05 2018

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 1, GCD[n, Times@@ ((First[#]+2)^Last[#] &/@FactorInteger[n])]]; Array[a, 120] (* Amiram Eldar, Dec 05 2018~ *)
  • PARI
    A166590(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] += 2); factorback(f); };
    A322362(n) = gcd(n, A166590(n));

Formula

a(n) = gcd(n, A166590(n)).
a(A037074(n)) = A006512(n).

A059267 Numbers n with 2 divisors d1 and d2 having difference 2: d2 - d1 = 2; equivalently, numbers that are 0 (mod 4) or have a divisor d of the form d = m^2 - 1.

Original entry on oeis.org

3, 4, 6, 8, 9, 12, 15, 16, 18, 20, 21, 24, 27, 28, 30, 32, 33, 35, 36, 39, 40, 42, 44, 45, 48, 51, 52, 54, 56, 57, 60, 63, 64, 66, 68, 69, 70, 72, 75, 76, 78, 80, 81, 84, 87, 88, 90, 92, 93, 96, 99, 100, 102, 104, 105, 108, 111, 112, 114, 116, 117, 120, 123, 124, 126, 128
Offset: 1

Views

Author

Avi Peretz (njk(AT)netvision.net.il), Jan 23 2001

Keywords

Comments

Complement of A099477; A008586, A008585 and A037074 are subsequences - Reinhard Zumkeller, Oct 18 2004
These numbers have an asymptotic density of ~ 0.522. This corresponds to all numbers which are multiples of 4 (25%), or of 3 (having 1 & 3 as divisors: + (1-1/4)*1/3 = 1/4), or of 5*7, or of 11*13, etc. (Generally, multiples of lcm(k,k+2), but multiples of 3 and 4 are already taken into account in the 50% covered by the first 2 terms.) - M. F. Hasler, Jun 02 2012
By considering divisors of the form m^2-1 with m <= 200 it is possible to prove that the density of this sequence is in the interval (0.5218, 0.5226). The numbers of terms not exceeding 10^k, for k = 1, 2, ..., are 5, 52, 521, 5219, 52206, 522146, 5221524, 52215473, 522155386, 5221555813, ..., so the asymptotic density of this sequence can be estimated empirically by 0.522155... . - Amiram Eldar, Sep 25 2022

Examples

			a(18) = 35 because 5 and 7 divide 35 and 7 - 5 = 2.
		

Crossrefs

Programs

  • Maple
    isA059267 := proc(n)
        local m ;
        if modp(n,4)=0 then
            true;
        else
            for m from 2 to ceil(sqrt(n)) do
                if modp(n,m^2-1) = 0 then
                    return true ;
                end if;
            end do;
            false ;
        end if;
    end proc:
    for n from 1 to 130 do
        if isA059267(n) then
            printf("%d,",n) ;
        end if;
    end do:
  • Mathematica
    d1d2Q[n_]:=Mod[n,4]==0||AnyTrue[Sqrt[#+1]&/@Divisors[n],IntegerQ]; Select[ Range[ 200],d1d2Q] (* Harvey P. Dale, May 31 2020 *)
  • PARI
    isA059267(n)={ n%4==0 || fordiv( n,d, issquare(d+1) && return(1))} \\ M. F. Hasler, Aug 29 2008
    
  • PARI
    is_A059267(n) = fordiv( n,d, n%(d+2)||return(1)) \\ M. F. Hasler, Jun 02 2012

Formula

A099475(a(n)) > 0. - Reinhard Zumkeller, Oct 18 2004

Extensions

More terms from James Sellers, Jan 24 2001
Removed comments linking to A143714, which seem wrong, as observed by Ignat Soroko, M. F. Hasler, Jun 02 2012

A071697 Product of twin primes of form (4*k+1,4*k+3), k>0.

Original entry on oeis.org

35, 323, 899, 1763, 10403, 19043, 22499, 39203, 72899, 79523, 213443, 272483, 324899, 381923, 412163, 656099, 675683, 736163, 777923, 1102499, 1127843, 1512899, 1633283, 1664099, 1695203, 2196323, 2883203, 2965283, 3526883, 3802499, 3992003, 4334723, 4536899
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 04 2002

Keywords

Crossrefs

Programs

  • Magma
    [16*n^2+16*n+3: n in [1..700]| IsPrime(4*n+1) and IsPrime(4*n+3)]; // Vincenzo Librandi, Feb 24 2015
  • PARI
    lista(nn) = {forprime(p=3, nn, if ((((p-1) % 4) == 0) && isprime(p+2), print1(p*(p+2), ", ")););} \\ Michel Marcus, Feb 24 2015
    

Formula

a(n) = A071695(n)*A071696(n).

Extensions

More terms from Michel Marcus, Feb 24 2015

A072026 Swap twin prime pairs >(3,5) in prime factorization of n.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 13, 12, 11, 10, 21, 16, 19, 18, 17, 28, 15, 26, 23, 24, 49, 22, 27, 20, 31, 42, 29, 32, 39, 38, 35, 36, 37, 34, 33, 56, 43, 30, 41, 52, 63, 46, 47, 48, 25, 98, 57, 44, 53, 54, 91, 40, 51, 62, 61, 84, 59, 58, 45, 64, 77, 78
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 07 2002

Keywords

Examples

			a(143)=a(11*13)=a(11)*a(13)=13*11=143; a(77)=a(7*11)=a(7)*a(11)=5*13=65.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Product[{p, e} = pe; If[p <= 3, p, If[PrimeQ[p+2], p+2, If[PrimeQ[p-2], p-2, p]]]^e, {pe, FactorInteger[n]}];
    Array[a, 100] (* Jean-François Alcover, Nov 20 2021 *)

Formula

a(a(n)) = n, a self-inverse permutation of natural numbers.
a(n) = n for single primes (A007510) and products of twin prime pairs (A037074).
Multiplicative with a(p) = (if p<=3 then p else (if p+2 is prime then p+2 else (if p-2 is prime then p-2 else p))), p prime.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p, q primes > 3, p = q+2} ((p^2-p)*(q^2-q)/((p^2-q)*(q^2-p))) = 0.53439004468579249988... . - Amiram Eldar, Dec 24 2022

A074040 Product of first n twin prime pair products.

Original entry on oeis.org

15, 525, 75075, 24249225, 21800053275, 38433493923825, 138322144631846175, 716923675626858725025, 7458156997546211316435075, 86984485062381462583582279725, 1656445549042930191979157352803175
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 13 2002

Keywords

Examples

			The first two twin prime pairs are (3,5) and (5,7), their products: 15 and 35, therefore a(2)=15*35=525.
		

Crossrefs

Programs

  • Mathematica
    a = {4, 6, 12, 18, 30, 42, 60, 72, 102, 108, 138, 150} (* A014574 *); Table[ Product[a[[k]]^2 - 1, {k, 1, n}], {n, 1, 12}]
    Rest[FoldList[Times,1,Times@@@Select[Partition[Prime[Range[50]],2,1],#[[2]]-#[[1]]==2&]]] (* Harvey P. Dale, Jan 19 2015 *)
    step[{list_, q_}] := Module[{p=NextPrime[q]}, {Join[list, If[PrimeQ[p+2], {{p,p+2}}, {}]], p}]
    pairList[n_] := First[NestWhile[step, {{{3, 5}}, 3}, Length[First[step[#]]]<=n&]]
    a037074[n_] := Map[Apply[Times, #]&, pairList[n]]
    a074040[n_] := Rest[FoldList[Times, 1, a037074[n]]]
    a074040[11] (* Hartmut F. W. Hoft, Apr 27 2021 *)

Formula

a(1) = A037074(1) and a(n) = a(n-1)*A037074(n) for n>1.
a(n) = A079164(2*n).

Extensions

Edited by Robert G. Wilson v, Aug 17 2002
Corrections in Comment and Example, and added references. Hartmut F. W. Hoft, Apr 27 2021

A221054 Numbers whose distinct prime factors can be partitioned into two equal sums.

Original entry on oeis.org

1, 30, 60, 70, 90, 120, 140, 150, 180, 240, 270, 280, 286, 300, 350, 360, 450, 480, 490, 540, 560, 572, 600, 646, 700, 720, 750, 810, 900, 960, 980, 1080, 1120, 1144, 1200, 1292, 1350, 1400, 1440, 1500, 1620, 1750, 1798, 1800, 1920, 1960, 2145, 2160, 2240, 2250, 2288, 2310, 2400, 2430, 2450, 2584, 2700, 2730, 2800, 2880, 3000, 3135
Offset: 1

Views

Author

Keywords

Comments

This is a superset of 2*product of twin primes, A071142.

Crossrefs

Cf. A175592 (multiplicity of prime factors allowed).
Cf. A071139-A071147, especially A071140.

Programs

  • Haskell
    a221054 n = a221054_list !! (n-1)
    a221054_list = filter (z 0 0 . a027748_row) $ tail a005843_list where
       z u v []     = u == v
       z u v (p:ps) = z (u + p) v ps || z u (v + p) ps
    -- Reinhard Zumkeller, Apr 18 2013
    
  • Mathematica
    q[n_] := Module[{p = FactorInteger[n][[;; , 1]], sum, x}, sum = Total[p]; EvenQ[sum] && CoefficientList[Product[1 + x^i, {i, p}], x][[1 + sum/2]] > 0]; Select[Range[3200], q] (* Amiram Eldar, May 31 2025 *)
  • PARI
    isok(k) = my(f=factor(k), nb=#f~); for (i=0,2^nb-1, my(v=Vec(Vecrev(binary(i)), nb)); if (sum(k=1, nb, if (v[k], f[k,1])) == sum(k=1, nb, if (!v[k], f[k,1])), return(1));); \\ Michel Marcus, May 31 2025

Extensions

Missing terms inserted by Michel Marcus, May 31 2025
Previous Showing 21-30 of 78 results. Next