Displaying 1-10 of 10 results found.
page
1
Sum of the primes from the smallest prime factor of n to the largest prime factor of n.
+10
8
0, 2, 3, 2, 5, 5, 7, 2, 3, 10, 11, 5, 13, 17, 8, 2, 17, 5, 19, 10, 15, 28, 23, 5, 5, 41, 3, 17, 29, 10, 31, 2, 26, 58, 12, 5, 37, 77, 39, 10, 41, 17, 43, 28, 8, 100, 47, 5, 7, 10, 56, 41, 53, 5, 23, 17, 75, 129, 59, 10, 61, 160, 15, 2, 36, 28, 67, 58, 98, 17, 71, 5, 73, 197, 8
COMMENTS
Obviously if n is prime then a(n) = n. However, there are composite values of n such that a(n) = n, such as 10 and 155. - Alonso del Arte, May 30 2017
EXAMPLE
a(14) = 17 because 14 = 2 * 7 and 2 + 3 + 5 + 7 = 17.
MAPLE
f:=proc(n) local i, t1, t2, t3, t4, t5, t6; if n<=1 then RETURN(0) else
t1:=ifactors(n); t2:=t1[2]; t3:=nops(t2); t4:=0; t5:=pi(t2[1][1]); t6:=pi(t2[t3][1]);
for i from t5 to t6 do t4:=t4+ithprime(i); od; RETURN(t4); fi; end; # N. J. A. Sloane, May 24 2010
# second Maple program:
s:= proc(n) option remember; `if`(n<1, 0, ithprime(n)+s(n-1)) end:
a:= proc(n) option remember; uses numtheory; `if`(n<2, 0, (m->
s(pi(max(m)))-s(pi(min(m))-1))(factorset(n)))
end:
MATHEMATICA
sp[n_]:=With[{fi=FactorInteger[n][[All, 1]]}, Total[Prime[Range[ PrimePi[ fi[[1]]], PrimePi[fi[[-1]]]]]]]; Join[{0}, Array[sp, 80, 2]] (* Harvey P. Dale, Dec 22 2017 *)
PROG
(PARI) a(n) = if (n==1, 0, my(f = factor(n), s = 0); forprime(p=f[1, 1], f[#f~, 1], s += p); s); \\ Michel Marcus, May 31 2017
Composite numbers that are the sum of consecutive prime numbers and are divisible by the first and last of these primes.
+10
6
10, 39, 155, 371, 10225245560, 2935561623745, 454539357304421, 7228559051256366318, 1390718713078158117206
COMMENTS
Composite n such that n = p_1 + p_2 + ... + p_k where the p_i are consecutive primes and n is divisible by p_1 and p_k.
Problem proposed by Carlos Rivera, who found the first 4 terms.
In subsequence A055233 the first and last term of the sum must also be its smallest and largest prime factor. Therefore a(5) (cf. first EXAMPLE) is not in that sequence, since it has smaller factors 2^3*5. - M. F. Hasler, Nov 21 2021
EXAMPLE
503 + 509 + 521 + ... + 508213 = 10225245560, which is divisible by 503 and 508213. - Manuel Valdivia, Nov 17 2011
a(8) = 7228559051256366318 = 73 + ... + 18281691653;
a(9) = 1390718713078158117206 = 370794889 + ... + 267902967061. (End)
MATHEMATICA
Module[{nn=200}, Table[Total/@Select[Partition[Prime[Range[10000]], n, 1], scpQ], {n, 2, nn}]]//Flatten (* The program generates the first four terms of the sequence. *)
PROG
(PARI) S=vector(N=50000); s=0; i=1; forprime(p=2, oo, S[i++]=s+=p; for(j=1, i-2, (s-S[j])%p || (s-S[j])%prime(j)|| print1(s-S[j]", ")|| break)) \\ gives a(1..5), but too slow to go beyond. - M. F. Hasler, Nov 21 2021
a(n) = the least k such that prime(n+1)+prime(n+2)+...+prime(n+k) is a multiple of prime(n).
+10
3
2, 2, 6, 6, 6, 6, 4, 8, 4, 30, 7, 31, 37, 67, 22, 60, 46, 38, 69, 13, 65, 76, 19, 163, 9, 52, 100, 84, 66, 136, 66, 119, 33, 79, 47, 76, 187, 214, 37, 96, 461, 111, 62, 189, 510, 37, 256, 121, 130, 132, 144, 481, 64, 195, 53, 47, 136, 90, 194, 318, 526, 151, 788, 1542
COMMENTS
Conjecture: a(n) exists for every n.
EXAMPLE
a(3)=6 because prime(3)=5 divides 7+11+13+17+19+23 = 90.
MATHEMATICA
bb={}; Do[s0=Prime[n0]; s=0; Do[s+=Prime[n]; If[IntegerQ[s/s0], bb=Append[bb, n-n0]; Break[]], {n, n0+1, 8000}], {n0, 1, 100}]; bb
sncp[n_]:=Module[{p=Prime[n], k=n+1, t}, t=Prime[k]; While[!Divisible[ t, p], k++; t=t+Prime[k]]; k-n]; Array[sncp, 100] (* Harvey P. Dale, May 21 2017 *)
PROG
(PARI) a(n)=my(p = prime(n), sp = nextprime(p+1), lp = sp, nb = 1); while (sp % p, lp = nextprime(lp+1); nb++; sp += lp); nb; \\ Michel Marcus, May 21 2017
(PARI) a(n, p=prime(n))=my(s, k); forprime(q=p+1, , s+=q; k++; if(s%p==0, return(k))) \\ Charles R Greathouse IV, May 21 2017
a(n) = the least integer of the form [prime(n+1)+prime(n+2)+...+prime(n+k)]/prime(n).
+10
3
4, 4, 18, 16, 12, 12, 6, 16, 6, 102, 11, 93, 119, 345, 48, 240, 138, 100, 263, 19, 227, 282, 31, 1071, 11, 126, 386, 278, 184, 642, 164, 445, 55, 213, 89, 190, 895, 1120, 61, 258, 4629, 323, 122, 789, 5226, 59, 1292, 325, 364, 374, 430, 3939, 118, 695, 87, 73, 358
COMMENTS
It seems that a(n) exists for any n.
Among first 1000 terms, the largest term is a(793) = 1807606, with p = prime(793) = 6079, and 6079*1807606 = the sum of 42840 consecutive primes after p. - Zak Seidov, Nov 07 2014
Among first 10000 terms, the largest term is a(9349) = 30376745, with p = prime(9349) = 97159, and p*(9349) = the sum of 629543 consecutive primes after p: 2951374167455 = sum(prime(k), k = 9349 + 1..9349 + 629543) - Zak Seidov, Feb 21 2015
EXAMPLE
a(3)=18 because prime(3)=5 and (7+11+13+17+19+23)/5 = 18.
MATHEMATICA
bb={}; Do[s0=Prime[n0]; s=0; Do[If[IntegerQ[ss0=(s+=Prime[n])/s0], bb=Append[bb, ss0]; Break[]], {n, n0+1, 8000}], {n0, 1, 10}]; bb
Numbers k equal to A074036(k) = sum of primes from least to largest prime factor.
+10
3
2, 3, 5, 7, 10, 11, 13, 17, 19, 23, 29, 31, 37, 39, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 155, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271
MATHEMATICA
upto=500; a={}; Do[f=Map[First, FactorInteger[k]]; If[k==Total[Select[Range[First[f], Last[f]], PrimeQ]], AppendTo[a, k]], {k, upto}]; a (* Paolo Xausa, Nov 27 2021 *)
PROG
(PARI) select( {is_ A169802(n, f=factor(n)[, 1])=n>1&&n==vecsum(primes([f[1], f[#f]]))}, [1..222]) \\ M. F. Hasler, Nov 24 2021
CROSSREFS
Cf. A055233 (this without primes), A074036 (sum of primes from spf(n) to gpf(n)).
Cf. A020639 (spf: smallest prime factor), A006530 (gpf: greatest prime factor).
Numbers equal to the sum of the numbers between two of their consecutive divisors.
+10
1
490, 55930, 98648, 222560, 396550, 584988, 838448, 1173102, 2345720, 2855660, 4150120, 4781502, 5557300, 6072460, 6115122, 6688416, 6715280, 9390290, 9486950, 11691498, 12704510, 13331240, 16035760, 17325700, 19377050, 20055070, 20859410, 29651748, 34516160, 35040352
COMMENTS
If also the two consecutive divisors were added to the sum, the first terms would be 18, 55120, 1034540, 1386350, 1675960, ...
EXAMPLE
a(1) = 490 because 14 and 35 are two consecutive divisors of 490 and the sum of the numbers from 15 to 34 is equal to 490 itself.
a(7) = 838448 because 1807 and 2224 are two consecutive divisors of 838448 and the sum of the numbers from 1808 to 2223 is equal to 838448 itself.
MAPLE
with(numtheory): P:=proc(q) local a, k, n;
for n from 1 to q do if not isprime(n) then a:=sort([op(divisors(n))]);
for k from 1 to tau(n)-1 do if n=((a[k+1]-1)*a[k+1]-a[k]*(a[k]+1))/2
then print(n); break; fi; od; fi; od; end: P(10^9);
MATHEMATICA
Select[Range[351*10^5], MemberQ[Total[Range[#[[1]]+1, #[[2]]-1]]&/@Partition[ Divisors[ #], 2, 1], #]&] (* Harvey P. Dale, Feb 14 2023 *)
PROG
(PARI) isok(n) = my(d=divisors(n)); vecsearch(vecsort(vector(#d-1, k, ((d[k+1]-1)*d[k+1]-d[k]*(d[k]+1))/2), , 8), n); \\ Michel Marcus, Apr 27 2018
Numbers equal to the sum of the numbers between two of their divisors.
+10
1
12, 30, 60, 90, 108, 180, 234, 240, 390, 408, 420, 462, 480, 490, 630, 756, 840, 880, 900, 945, 1122, 1218, 1248, 1430, 1500, 1512, 1560, 1584, 1998, 2070, 2100, 2310, 2460, 2520, 2652, 2660, 2970, 3306, 3330, 3528, 3780, 3960, 4004, 4032, 4134, 4140, 4275, 4788
COMMENTS
A303556 is a subsequence of this sequence.
EXAMPLE
Divisors of 12 are 1, 2, 3, 4, 6, 12 and the sum of the numbers between 2 and 6 is 3 + 4 + 5 = 12.
Divisors of 108 are 1, 2, 3, 4, 6, 9, 12, 18, 27, 36, 54, 108 and the sum of the numbers between 9 and 18 is 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 = 108.
MAPLE
with(numtheory): P:=proc(n) local a, j, k; a:=sort([op(divisors(n))]);
for j from 1 to nops(a)-1 do for k from j+1 to nops(a) do
if n=((a[k]-1)*a[k]-a[j]*(a[j]+1))/2 then RETURN(n); fi;
od; od; end: seq(P(i), i=2..10^4);
MATHEMATICA
Select[Range[5000], MemberQ[Union@ Map[Total@ Range[#1 + 1, #2 - 1] & @@ # &, Subsets[Divisors@ #, {2}]], #] &] (* Michael De Vlieger, Jan 18 2019 *)
Sum of the primes from smallest prime factor of n to the largest prime factor of n = largest difference between consecutive divisors of n (ordered by size).
+10
0
4, 20, 1278, 1339, 11074308238, 19096347067
MATHEMATICA
Select[Range[2, 2000], (p = First /@ FactorInteger[#]; #-#/p[[1]] == Sum[ Prime[i], {i, PrimePi@ p[[1]], PrimePi@ p[[-1]]}]) &] (* Giovanni Resta, May 13 2016 *)
PROG
(PARI) isok(n) = {pf = factor(n)[, 1]; my(pmin = vecmin(pf)); s = 0; forprime(p = pmin, vecmax(pf), s += p); s == n - n/pmin; } \\ Michel Marcus, Feb 03 2014
Product of two nonconsecutive primes p and q that divides the sum of primes between p and q, exclusively.
+10
0
26, 1133, 20309, 51159, 3246905, 28673661, 5201685791
COMMENTS
Prime p is approximately q/((2*log(q)-1)*k), for k = 1, 1, 3, 307, 5041, 102378,..(quotients).
a(8) > 2*10^10. 3235398421447 is also a term. - Donovan Johnson, Nov 23 2011
EXAMPLE
51159 = 3*17053, (5+ ... +17047)/51159 = 307.
MATHEMATICA
ss[n_] := Module[{f = Transpose[FactorInteger[n]], p, q, s}, If[f[[2]] == {1, 1}, {p, q} = PrimePi[f[[1]]]; s = Total[Table[Prime[i], {i, p + 1, q - 1}]]; s != 0 && Mod[s, n] == 0, False]]; Select[Range[2, 21000], ss] (* T. D. Noe, Nov 21 2011 *)
Non-prime-square numbers equal to the sum of squares of consecutive primes from the least prime factor to the largest prime factor.
+10
0
COMMENTS
So-called 2-straddled numbers; 1-straddled numbers are in A055233.
EXAMPLE
9634877 = 7 * 41 * 59 * 569 = 7^2 + 11^2 + 13^2 + ... + 569^2.
PROG
(PARI) isok(n) = if (isprimepower(n) != 2, if (n>1, my(f=factor(n)[, 1], s=0); forprime(p=vecmin(f), vecmax(f), s+= p^2); s == n)); \\ Michel Marcus, Jul 18 2019
Search completed in 0.011 seconds
|