A215021
a(n) = A118478(n)*(A118478(n)+1) divided by the product of the first n primes.
Original entry on oeis.org
1, 1, 1, 1, 19, 17, 1, 409, 604, 82, 20951, 229931, 411012, 39080794, 4382914408, 6345486566, 45119290746, 581075656330, 8672770990, 869561574799171, 71853663603175593, 25509154378676494, 24040267482771436703, 102403319155457392955, 11302410854347731819765
Offset: 1
A215085
a(n) = (A214089(n)^2 - 1) divided by four times the product of the first n primes.
Original entry on oeis.org
1, 1, 1, 1, 19, 17, 1, 2567, 3350, 128928, 3706896, 1290179, 100170428, 39080794, 61998759572, 7833495265, 45119290746, 581075656330, 8672770990, 15792702394898740, 594681417768520250, 25509154378676494, 1642780344643617537867, 480931910076867717575
Offset: 1
A214089(14) = 1430083494841, n#_14 = 13082761331670030, and (1430083494841^2 - 1) / (4 * 13082761331670030) = 39080794, so a(14) = 39080794.
-
A215085 := proc(n)
(A214089(n)^2-1)/4/A002110(n) ;
end proc: # R. J. Mathar, Aug 21 2012
-
from itertools import product
from sympy import sieve, prime, isprime, primorial
from sympy.ntheory.modular import crt
def A215085(n):
return (
1
if n == 1
else (
int(
min(
filter(
isprime,
(
crt(tuple(sieve.primerange(prime(n) + 1)), t)[0]
for t in product((1, -1), repeat=n)
),
)
)
)
** 2
- 1
)
// 4
// primorial(n)
) # Chai Wah Wu, May 31 2022
for n in range(1, 16):
print(A215085(n), end=", ")
A193314
The smallest k such that the product k*(k+1) is divisible by the first n primes and no others.
Original entry on oeis.org
1, 2, 5, 14, 384, 1715, 714, 633555
Offset: 1
n smallest k k*(k+1) prime factorization
1 1 2
2 2 2*3
3 5 2*3*5
4 14 2*3*5*7
5 384 2^7*3*5*7*11
6 1715 2^2*3*7^3*11*13
7 714 2*3*5*7*11*13*17
8 633555 2^2*3^3*5*7*11^3*13*17*19^2
-
a193314 n = head [k | k <- [1..], let kk' = a002378 k,
mod kk' (a002110 n) == 0, a006530 kk' == a000040 n]
-- Reinhard Zumkeller, Jun 14 2015
-
f[n_] := Block[{k = 1, p = Fold[ Times, 1, Prime@ Range@ n], tst = Prime@ Range@ n},While[ First@ Transpose@ FactorInteger[ k*p]!=tst || IntegerQ@ Sqrt[ 4k*p+1], k++]; Floor@ Sqrt[k*p]]; Array[f, 8]
(* the search for a(9), I also used *) lst = {}; p = Prime@ Range@ 9; Do[ q = {a, b, c, d, e, f, g, h, i}; If[ IntegerQ[ Sqrt[4Times @@ (p^q) + 1]], r = Floor@ Sqrt@ Times @@ (p^q); Print@ r; AppendTo[lst, r]], {i, 9}, {h, 9}, {g, 9}, {f, 10}, {e, 11}, {d, 14}, {c, 16}, {b, 24}, {a, 8}]
-
a(n)={
my(v=[Mod(0,1)],u,P=1,t,g,k);
forprime(p=2,prime(n),
P*=p;
u=List();
for(i=1,#v,
listput(u,chinese(v[i],Mod(-1,p)));
listput(u,chinese(v[i],Mod(0,p)))
);
v=0;v=Vec(u)
);
v=vecsort(lift(v));
while(1,
for(i=1,#v,
t=(v[i]+k)*(v[i]+k+1)/P;
if(!t,next);
while((g=gcd(P,t))>1, t/=g);
if (t==1, return(v[i]+k))
);
k += P
)
}; \\ Charles R Greathouse IV, Aug 18 2011
A354411
a(n) is the least oblong number that is divisible by the first n primes.
Original entry on oeis.org
2, 6, 30, 210, 43890, 510510, 510510, 3967173210, 134748093480, 530514844860, 4201942828713630, 1706257740074998110, 125050509312845636520, 511284700554162118403820, 2695009287439086535873235280, 206794067314254446263154097180, 86753583273488685998907289046220
Offset: 1
2, 3, and 5 are the first three primes. The first oblong number that is a multiple of all three first primes is 30. So, a(3) = 30.
The first oblong number that is a multiple of primorial(5) = 2310 is 19*2310 = 43890, so a(5) = 43890.
-
a002110(n) = prod(i=1,n, prime(i)) \\ after Washington Bomfim in A002110
a344005(n) = for(m=1, oo, if((m*(m+1))%n==0, return(m)))
a(n) = my(m=a344005(a002110(n))); m*(m+1) \\ Felix Fröhlich, May 31 2022
-
from sympy import integer_nthroot, primorial
def oblong(n): r = integer_nthroot(n, 2)[0]; return r*(r+1) == n
def a(n):
m = psharp = primorial(n)
while not oblong(m): m += psharp
return m
print([a(n) for n in range(1, 11)]) # Michael S. Branicky, May 25 2022
-
# faster alternative using Python 3.8+ A344005(n) by Chai Wah Wu
from sympy import primorial
def a(n): return (m := A344005(primorial(n)))*(m+1)
print([a(n) for n in range(1, 18)]) # Michael S. Branicky, May 26 2022
Showing 1-4 of 4 results.
Comments