Search: a115964 -id:a115964
|
|
A024451
|
|
a(n) is the numerator of Sum_{i = 1..n} 1/prime(i).
|
|
+10
61
|
|
|
0, 1, 5, 31, 247, 2927, 40361, 716167, 14117683, 334406399, 9920878441, 314016924901, 11819186711467, 492007393304957, 21460568175640361, 1021729465586766997, 54766551458687142251, 3263815694539731437539, 201015517717077830328949, 13585328068403621603022853
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
(n-1)-st elementary symmetric functions of first n primes; see Mathematica section. - Clark Kimberling, Dec 29 2011
Denominators of the harmonic mean of the first n primes; A250130 gives the numerators. - Colin Barker, Nov 14 2014
Let Pn(n) = A002110 denote the primorial function. The average number of distinct prime factors <= prime(n) in the natural numbers up to Pn(n) is equal to Sum_{i = 1..n} 1/prime(i). - Jamie Morken, Sep 17 2018
The above conjecture would imply that for n > 0, gcd(a(n), A369651(n)) = 1. See corollary 2 on the page 4 of Ufnarovski-Åhlander paper. - Antti Karttunen, Jan 31 2024
|
|
REFERENCES
|
S. R. Finch, Mathematical Constants, Cambridge, 2003, Sect. 2.2.
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Sect. VII.28.
|
|
LINKS
|
|
|
FORMULA
|
Limit_{n->oo} (Sum_{p <= n} 1/p - log log n) = 0.2614972... = A077761.
a(n) = (Product_{i=1..n} prime(i))*(Sum_{i=1..n} 1/prime(i)). - Benoit Cloitre, Jan 30 2002
(n+1)-st elementary symmetric function of the first n primes.
(End)
|
|
EXAMPLE
|
0/1, 1/2, 5/6, 31/30, 247/210, 2927/2310, 40361/30030, 716167/510510, 14117683/9699690, ...
|
|
MAPLE
|
h:= n-> add(1/(ithprime(i)), i=1..n);
t1:=[seq(h(n), n=0..50)];
|
|
MATHEMATICA
|
f[k_] := Prime[k]; t[n_] := Table[f[k], {k, 1, n}]
a[n_] := SymmetricPolynomial[n - 1, t[n]]
Table[a[n], {n, 1, 16}] (* A024451 *)
Numerator[Accumulate[1/Prime[Range[20]]]] (* Harvey P. Dale, Apr 11 2012 *)
|
|
PROG
|
(Magma) [ Numerator(&+[ NthPrime(k)^-1: k in [1..n]]): n in [1..18] ]; // Bruno Berselli, Apr 11 2011
(PARI) a(n) = numerator(sum(i=1, n, 1/prime(i))); \\ Michel Marcus, Sep 18 2018
(Python)
from sympy import prime
from fractions import Fraction
def a(n): return sum(Fraction(1, prime(k)) for k in range(1, n+1)).numerator
(Python)
from math import prod
from sympy import prime
q = prod(plist:=tuple(prime(i) for i in range(1, n+1)))
return sum(q//p for p in plist) # Chai Wah Wu, Nov 03 2022
|
|
CROSSREFS
|
Cf. A369972 (k where prime(1+k)|a(k)), A369973 (corresponding primorials), A293457 (corresponding primes).
|
|
KEYWORD
|
nonn,frac,easy,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|
|
A014701
|
|
Number of multiplications to compute n-th power by the Chandah-sutra method.
|
|
+10
14
|
|
|
0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8, 5, 6, 6, 7, 6, 7, 7, 8, 6, 7, 7, 8, 7, 8, 8, 9, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 6, 7, 7, 8, 7, 8, 8, 9, 7, 8, 8, 9, 8, 9, 9, 10, 7, 8, 8, 9, 8, 9, 9
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
In other words, number of steps to reach 1 starting from n and using the process: x -> x-1 if n is odd and x -> x/2 otherwise.
a(n) = number of 0's + twice number of 1's (disregarding the leading digit 1) in the binary expansion of n, i.e., A007088(n). - Lekraj Beedassy, May 28 2010
For the binary Fibonacci rabbits sequence (A036299) (cf. OEIS Wiki link below) we have the substitution/concatenation rule: a(n), n >= 3, may be obtained by the concatenation of a(n-1) and a(n-2), with a(1) = 0, a(2) = 1. Thus, using . (dot) as the concatenation operator, we have the recursive substitution/concatenation
a(n) = a(n-0)
a(n) = a(n-1).a(n-2)
a(n) = a(n-2).a(n-3).a(n-3).a(n-4)
a(n) = a(n-3).a(n-4).a(n-4).a(n-5).a(n-4).a(n-5).a(n-5).a(n-6)
which suggests the sequence
{0}
{1, 2}
{2, 3, 3, 4}
{3, 4, 4, 5, 4, 5, 5, 6}
whose concatenation gives A014701 (this sequence).
Number of multiplications to compute n-th power by the Chandah-sutra method, also called left-to-right binary exponentiation:
x^1 = x^( 1_2) = (x) (0 prod)
x^2 = x^( 10_2) = (x^2) (1 prod)
x^3 = x^( 11_2) = (x^2) * (x) (2 prod)
x^4 = x^( 100_2) = (x^2)^2 (2 prod)
x^5 = x^( 101_2) = (x^2)^2 * (x) (3 prod)
x^6 = x^( 110_2) = (x^2)^2 * (x^2) (3 prod)
x^7 = x^( 111_2) = (x^2)^2 * (x^2) * (x) (4 prod)
x^8 = x^(1000_2) = ((x^2)^2)^2 (3 prod) (End)
Index at which record m occurs is A052955(m).
First appearance of m in the sequence (or the record value m) is at n = 2^(m/2 + 1) - 1 for even m, and at n = 3*2^((m - 1)/2) - 1 for odd m.
The last appearance of m in the sequence is at n = 2^m. (End)
a(n) is the digit sum of n-1 in bijective base-2. Since the Fibonacci number F(m) can be defined as the number of ways to compose m as the sum of 1s and 2s, we get that m appears F(m) times in the sequence. - Oscar Cunningham, Apr 14 2024
|
|
LINKS
|
|
|
FORMULA
|
a(n) = floor(log_2(n)) + (number of 1's in binary representation of n) - 1. - Corrected (- 1 at end) by Daniel Forgues, Aug 01 2012
a(2^n) = n, a(2^n-1) = 2*(n-1), and for n >= 2, log_2(n) <= a(n) <= 2*log_2(n) - 1. - Robert FERREOL, Oct 01 2014
Let u(1) = 1, u(2*n) = u(n)+1, u(2*n+1) = u(2*n)+1; then a(1) = 0 and a(n) = u(n-1). - Benoit Cloitre, Dec 19 2002
G.f.: -2/(1-x) + (1/(1-x)) * Sum_{k>=0} (2*x^2^k + x^2^(k+1))/(1+x^2^k). - Ralf Stephan, Aug 15 2003
From {0}, apply the substitution rule (n -> n+1, n+2) repeatedly, giving {{0}, {1, 2}, {2, 3, 3, 4}, {3, 4, 4, 5, 4, 5, 5, 6}, ...} and concatenate. - Daniel Forgues, Jul 31 2012
a(n+1) = max_{1<=i<=n} (H(i) + H(n-i)) where H(n) denotes the Hamming weight of n (A000120(n)). See Lemma 8 in Gruber/Holzer 2021 article. - Hermann Gruber, Jun 26 2024
|
|
EXAMPLE
|
5 -> 4 -> 2 -> 1 so 3 steps are needed to reach 1 hence a(5)=3; 9 -> 8 -> 4 -> 2 -> 1 hence a(9)=4.
|
|
MAPLE
|
A014701 := proc(n) local j, k; j := n; k := 0; while(j>1) do if j mod 2=1 then j := j-1 else j := j/2 fi; k := k+1 od end;
# second Maple program:
a:= n-> add(i+1, i=Bits[Split](n))-2:
|
|
MATHEMATICA
|
a[n_] := DigitCount[n, 2] /. {x_, y_} -> 2x + y - 2; Array[a, 100] (* Robert G. Wilson v, Jul 31 2012 *)
|
|
PROG
|
(Haskell)
a014701 1 = 0
a014701 n = a007953 $ a007931 (n - 1)
(Python)
def a(n):
if n==1:
return 0
return a(n//2)+1+n%2
for i in range(1, 60):
print(a(i), end=", ")
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
James Kilfiger (jamesk(AT)maths.warwick.ac.uk)
|
|
STATUS
|
approved
|
|
|
|
|
A115963
|
|
Numerator of Sum_{i=1..n} 1/prime(i)^3.
|
|
+10
5
|
|
|
1, 35, 4591, 1601713, 2141141003, 4716413174591, 23198819007792583, 159253748925534977797, 1938552948676080555065099, 47290471293028435532185602511, 1409101231790431848106470385672201
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Denominators = A115964. See also: A024451 Numerator of Sum_{i=1..n} 1/prime(i). A002110 Primorial [denominator of Numerator of Sum_{i=1..n} 1/prime(i)]. A061015 Numerator of Sum_{i=1..n} 1/prime(i)^2.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Numerator of Sum_{i=1..n} 1/A000040(i)^3.
|
|
EXAMPLE
|
1/8, 35/216, 4591/27000, 1601713/9261000, 2141141003/12326391000, 4716413174591/27081081027000.
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,frac,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A241189
|
|
Numerator of Sum_{i=1..n} 1/(prime(i)*prime(i+1)).
|
|
+10
5
|
|
|
1, 7, 11, 127, 1693, 29243, 561623, 13019431, 379503437, 11809225121, 438235268123, 18007758091069, 775817745542929, 36524284093223105, 1938403609207158571, 2160165866032831207, 131893095784520401909, 8844093116997411126541, 628373208972323386101329, 45900898298568589325230523
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
EXAMPLE
|
1/6, 7/30, 11/42, 127/462, 1693/6006, 29243/102102, 561623/1939938, 13019431/44618574, 379503437/1293938646, 11809225121/40112098026, 438235268123/1484147626962, ...
|
|
MAPLE
|
g:= n-> add(1/(ithprime(i)*ithprime(i+1)), i=1..n);
t1:=[seq(g(n), n=1..20)];
|
|
MATHEMATICA
|
Table[Numerator@ Sum[1/(Prime[i + 1] Prime@ i), {i, n}], {n, 20}] (* Michael De Vlieger, Jan 27 2016 *)
Accumulate[1/#&/@(Times@@@Partition[Prime[Range[25]], 2, 1])]//Numerator (* Harvey P. Dale, Mar 14 2023 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,frac
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A304117
|
|
If n = Product (p_j^k_j) then a(n) = Product (pi(p_j)*k_j), where pi() = A000720.
|
|
+10
4
|
|
|
1, 1, 2, 2, 3, 2, 4, 3, 4, 3, 5, 4, 6, 4, 6, 4, 7, 4, 8, 6, 8, 5, 9, 6, 6, 6, 6, 8, 10, 6, 11, 5, 10, 7, 12, 8, 12, 8, 12, 9, 13, 8, 14, 10, 12, 9, 15, 8, 8, 6, 14, 12, 16, 6, 15, 12, 16, 10, 17, 12, 18, 11, 16, 6, 18, 10, 19, 14, 18, 12, 20, 12, 21, 12, 12, 16, 20, 12, 22, 12
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
a(p^k) = A000720(p)*k where p is a prime.
As an example:
|
|
EXAMPLE
|
a(36) = 8 because 36 = 2^2*3^2 = prime(1)^2*prime(2)^2 and 1*2*2*2 = 8.
|
|
MATHEMATICA
|
a[n_] := Times @@ (PrimePi[#[[1]]] #[[2]] & /@ FactorInteger[n]); a[1] = 1; Table[a[n], {n, 1, 80}]
|
|
PROG
|
(PARI) a(n) = my(f=factor(n)); for (k=1, #f~, f[k, 1] = primepi(f[k, 1])*f[k, 2]; f[k, 2] = 1); factorback(f); \\ Michel Marcus, May 06 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A304037
|
|
If n = Product (p_j^k_j) then a(n) = Sum (pi(p_j)^k_j), where pi() = A000720.
|
|
+10
3
|
|
|
0, 1, 2, 1, 3, 3, 4, 1, 4, 4, 5, 3, 6, 5, 5, 1, 7, 5, 8, 4, 6, 6, 9, 3, 9, 7, 8, 5, 10, 6, 11, 1, 7, 8, 7, 5, 12, 9, 8, 4, 13, 7, 14, 6, 7, 10, 15, 3, 16, 10, 9, 7, 16, 9, 8, 5, 10, 11, 17, 6, 18, 12, 8, 1, 9, 8, 19, 8, 11, 8, 20, 5, 21, 13, 11, 9, 9, 9, 22, 4, 16, 14, 23, 7, 10, 15, 12, 6
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
FORMULA
|
If gcd(u,v) = 1 then a(u*v) = a(u) + a(v).
a(p^k) = A000720(p)^k where p is a prime.
a(A002110(m)^k) = 1^k + 2^k + ... + m^k.
As an example:
|
|
EXAMPLE
|
a(72) = 5 because 72 = 2^3*3^2 = prime(1)^3*prime(2)^2 and 1^3 + 2^2 = 5.
|
|
MATHEMATICA
|
a[n_] := Plus @@ (PrimePi[#[[1]]]^#[[2]]& /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 88}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A356014
|
|
Consider the exponents in the prime factorization of n, and replace each run of k consecutive e's by a unique e; the resulting list corresponds to the exponents in the prime factorization of a(n).
|
|
+10
3
|
|
|
1, 2, 3, 4, 3, 2, 3, 8, 9, 10, 3, 12, 3, 10, 3, 16, 3, 18, 3, 20, 21, 10, 3, 24, 9, 10, 27, 20, 3, 2, 3, 32, 21, 10, 3, 4, 3, 10, 21, 40, 3, 10, 3, 20, 45, 10, 3, 48, 9, 50, 21, 20, 3, 54, 21, 40, 21, 10, 3, 12, 3, 10, 63, 64, 21, 10, 3, 20, 21, 10, 3, 72, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
We ignore the exponents (all 0's) for the prime numbers beyond the greatest prime factor of n.
This sequence operates on prime exponents as A090079 and A337864 operate on binary and decimal digits, respectively.
|
|
LINKS
|
|
|
FORMULA
|
a(a(n)) = a(n).
a(n^k) = a(n)^k for any k >= 0.
a(n) = 3 iff n belongs to A294674 \ {1}.
a(n) = 4 iff n belongs to A061742 \ {1}.
|
|
EXAMPLE
|
For n = 99:
- 99 = 11^1 * 7^0 * 5^0 * 3^2 * 2^0,
- the list of exponents is: 1 0 0 2 0,
- compressing consecutive values, we obtain: 1 0 2 0,
- so a(99) = 7^1 * 5^0 * 3^2 * 2^0 = 63.
|
|
PROG
|
(PARI) a(n) = { my (v=1, e=-1, k=0); forprime (p=2, oo, if (n==1, return (v), if (e!=e=valuation(n, p), v*=prime(k++)^e); n/=p^e)) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A361810
|
|
a(n) is the sum of divisors of n that are both infinitary and exponential.
|
|
+10
3
|
|
|
1, 2, 3, 4, 5, 6, 7, 10, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 30, 25, 26, 30, 28, 29, 30, 31, 34, 33, 34, 35, 36, 37, 38, 39, 50, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 60, 55, 70, 57, 58, 59, 60, 61, 62, 63, 68, 65, 66, 67, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The number of these divisors is A359411(n).
The indices of records of a(n)/n are the primorials (A002110) cubed, i.e., 1 and the terms of A115964.
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = Sum_{d|e, bitor(d, e) == e} p^d.
a(n) >= n, with equality if and only if n is in A138302.
limsup_{n->oo} a(n)/n = Product_{p prime} (1 + 1/p^2) = 15/Pi^2 (A082020).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((1 - 1/p)*(1 + Sum_{e>=1} Sum_{d|e, bitor(d, e) == e} p^(d-2*e))) = 0.51015879911178031024... .
|
|
EXAMPLE
|
a(8) = 10 since 8 has 2 divisors that are both infinitary and exponential, 2 and 8, and 2 + 8 = 10.
|
|
MATHEMATICA
|
f[p_, e_] := DivisorSum[e, p^# &, BitOr[#, e] == e &]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
|
|
PROG
|
(PARI) s(p, e) = sumdiv(e, d, p^d*(bitor(d, e) == e));
a(n) = {my(f = factor(n)); prod(i = 1, #f~, s(f[i, 1], f[i, 2])); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A359412
|
|
Numbers with a record number of divisors that are both infinitary and exponential.
|
|
+10
2
|
|
|
1, 8, 216, 27000, 9261000, 12326391000, 27081081027000, 110924107886592000, 544970142046826496000, 3737950204299182936064000, 45479640135708158783090688000, 1109202943269786284560798789632000, 33044264882950203203350756741926912000, 1673791149116076642859325881248823873536000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
a(2)-a(7) are the first 6 terms of A115964.
The first 15 terms are cubes. Are there noncubes in this sequence?
The corresponding record values are 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, ... . Apparently, this sequence of records is the powers of 2 (A000079).
|
|
LINKS
|
|
|
MATHEMATICA
|
s[n_] := DivisorSum[n, 1 &, BitAnd[n, #] == # &]; f[p_, e_] := s[e]; d[1] = 1; d[n_] := Times @@ f @@@ FactorInteger[n];
v = Cases[Import["https://oeis.org/A025487/b025487.txt", "Table"], {_, _}][[;; , 2]];
seq = {}; dm = 0; Do[If[(dk = d[v[[k]]]) > dm, dm = dk; AppendTo[seq, v[[k]]]], {k, 1, Length[v]}]; seq
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|
|
A362854
|
|
The sum of the divisors of n that are both bi-unitary and exponential.
|
|
+10
2
|
|
|
1, 2, 3, 4, 5, 6, 7, 10, 9, 10, 11, 12, 13, 14, 15, 18, 17, 18, 19, 20, 21, 22, 23, 30, 25, 26, 30, 28, 29, 30, 31, 34, 33, 34, 35, 36, 37, 38, 39, 50, 41, 42, 43, 44, 45, 46, 47, 54, 49, 50, 51, 52, 53, 60, 55, 70, 57, 58, 59, 60, 61, 62, 63, 70, 65, 66, 67, 68
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The number of these divisors is A362852(n).
The indices of records of a(n)/n are the primorials (A002110) cubed, i.e., 1 and the terms of A115964.
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = Sum_{d|e} p^d if e is odd, and (Sum_{d|e} p^d) - p^(e/2) if e is even.
a(n) >= n, with equality if and only if n is cubefree (A004709).
limsup_{n->oo} a(n)/n = Product_{p prime} (1 + 1/p^2) = 15/Pi^2 (A082020).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((1 - 1/p)*(1 + Sum_{e>=1} Sum_{d|e, d != e/2}, p^(d-2*e))) = 0.5124353304539905... .
|
|
EXAMPLE
|
a(8) = 10 since 8 has 2 divisors that are both bi-unitary and exponential, 2 and 8, and 2 + 8 = 10.
|
|
MATHEMATICA
|
f[p_, e_] := DivisorSum[e, p^# &] - If[OddQ[e], 0, p^(e/2)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
|
|
PROG
|
(PARI) s(p, e) = sumdiv(e, d, p^d*(2*d != e));
a(n) = {my(f = factor(n)); prod(i = 1, #f~, s(f[i, 1], f[i, 2])); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
Search completed in 0.011 seconds
|