login
Search: author:de geest
     Sort: relevance | references | number | modified | created      Format: long | short | data
a(1) = 1; for n > 1, a(n) = largest proper divisor of n (that is, for n>1, maximum divisor d of n in range 1 <= d < n).
+10
249
1, 1, 1, 2, 1, 3, 1, 4, 3, 5, 1, 6, 1, 7, 5, 8, 1, 9, 1, 10, 7, 11, 1, 12, 5, 13, 9, 14, 1, 15, 1, 16, 11, 17, 7, 18, 1, 19, 13, 20, 1, 21, 1, 22, 15, 23, 1, 24, 7, 25, 17, 26, 1, 27, 11, 28, 19, 29, 1, 30, 1, 31, 21, 32, 13, 33, 1, 34, 23, 35, 1, 36, 1, 37, 25, 38, 11, 39, 1, 40
OFFSET
1,4
COMMENTS
It seems that a(n) = Max_{j=n+1..2n-1} gcd(n,j). - Labos Elemer, May 22 2002
This is correct: No integer in the range [n+1, 2n-1] has n as its divisor, but certainly at least one multiple of the largest proper divisor of n will occur there (e.g., if it is n/2, then at n + (n/2)). - Antti Karttunen, Dec 18 2014
The slopes of the visible lines made by the points in the scatter plot are 1/2, 1/3, 1/5, 1/7, ... (reciprocals of primes). - Moosa Nasir, Jun 19 2022
LINKS
Rémi Eismann, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)
Moosa Nasir, Slopes.
Eric Weisstein's World of Mathematics, Proper Divisor.
FORMULA
a(n) = n / A020639(n).
Other identities and observations:
A054576(n) = a(a(n)); A117358(n) = a(a(a(n))) = a(A054576(n)); a(A008578(n)) = 1, a(A002808(n)) > 1. - Reinhard Zumkeller, Mar 10 2006
a(n) = A130064(n) / A006530(n). - Reinhard Zumkeller, May 05 2007
a(m)*a(n) < a(m*n) for m and n > 1. - Reinhard Zumkeller, Apr 11 2008
a(m*n) = max(m*a(n), n*a(m)). - Robert Israel, Dec 18 2014
From Antti Karttunen, Mar 31 2018: (Start)
a(n) = n - A060681(n).
For n > 1, a(n) = A003961^(r)(A246277(n)), where r = A055396(n)-1 and A003961^(r)(n) stands for shifting the prime factorization of n by r positions towards larger primes.
For all n >= 1, A276085(a(A276086(n))) = A276151(n).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=1} A005867(k-1)/(prime(k)*A002110(k)) = 0.165049... . - Amiram Eldar, Nov 19 2022
MAPLE
A032742 :=proc(n) option remember; if n = 1 then 1; else numtheory[divisors](n) minus {n} ; max(op(%)) ; end if; end proc: # R. J. Mathar, Jun 13 2011
1, seq(n/min(numtheory:-factorset(n)), n=2..1000); # Robert Israel, Dec 18 2014
MATHEMATICA
f[n_] := If[n == 1, 1, Divisors[n][[-2]]]; Table[f[n], {n, 100}] (* Vladimir Joseph Stephan Orlovsky, Mar 03 2010 *)
Join[{1}, Divisors[#][[-2]]&/@Range[2, 80]] (* Harvey P. Dale, Nov 29 2011 *)
a[n_] := n/FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Nov 26 2020 *)
Table[Which[n==1, 1, PrimeQ[n], 1, True, Divisors[n][[-2]]], {n, 80}] (* Harvey P. Dale, Feb 02 2022 *)
PROG
(PARI) a(n)=if(n==1, 1, n/factor(n)[1, 1]) \\ Charles R Greathouse IV, Jun 15 2011
(Haskell)
a032742 n = n `div` a020639 n -- Reinhard Zumkeller, Oct 03 2012
(Scheme) (define (A032742 n) (/ n (A020639 n))) ;; Antti Karttunen, Dec 18 2014
(Python)
from sympy import factorint
def a(n): return 1 if n == 1 else n//min(factorint(n))
print([a(n) for n in range(1, 81)]) # Michael S. Branicky, Jun 21 2022
CROSSREFS
Maximal GCD of k positive integers with sum n for k = 2..10: this sequence (k=2,n>=2), A355249 (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), A355402 (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).
KEYWORD
nonn,easy,nice
AUTHOR
_Patrick De Geest_, May 15 1998
EXTENSIONS
Definition clarified by N. J. A. Sloane, Dec 26 2022
STATUS
approved
a(0) = 0; for n > 0, a(n) = number of proper divisors of n (divisors of n which are less than n).
+10
204
0, 0, 1, 1, 2, 1, 3, 1, 3, 2, 3, 1, 5, 1, 3, 3, 4, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 3, 5, 1, 7, 1, 5, 3, 3, 3, 8, 1, 3, 3, 7, 1, 7, 1, 5, 5, 3, 1, 9, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 11, 1, 3, 5, 6, 3, 7, 1, 5, 3, 7, 1, 11, 1, 3, 5, 5, 3, 7, 1, 9, 4, 3, 1, 11, 3, 3, 3, 7, 1, 11, 3, 5, 3, 3, 3, 11, 1, 5, 5
OFFSET
0,5
COMMENTS
Number of d < n which divide n.
Call an integer k between 1 and n a "semi-divisor" of n if n leaves a remainder of 1 when divided by k, i.e., n == 1 (mod k). a(n) gives the number of semi-divisors of n+1. - Joseph L. Pe, Sep 11 2002
a(n+1) is also the number of k, 0 <= k <= n-1, such that C(n,k) divides C(n,k+1). - Benoit Cloitre, Oct 17 2002
a(n+1) is also the number of factors of the n-th degree polynomial x^n + x^(n-1) + x^(n-2) + ... + x^2 + x + 1. Example: 1 + x + x^2 + x^3 = (1+x)(1+x^2) implies a(4)=2.
a(n) is also the number of factors of the n-th Fibonacci polynomial. - T. D. Noe, Mar 09 2006
Number of partitions of n into 2 parts with the second dividing the first. - Franklin T. Adams-Watters, Sep 20 2006
Number of partitions of n+1 into exactly one q and at least one q+1. Example: a(12)=5; indeed, we have 13 = 7 + 6 = 5 + 4 + 4 = 4 + 3 + 3 + 3 = 3 + 2 + 2 + 2 + 2 + 2 = 2 + 11*1.
Differences of A002541. - George Beck, Feb 12 2012
For n > 1: number of ones in row n+1 of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
For n > 0, a(n) is the number of strong divisors of n. - Omar E. Pol, May 03 2015
a(n) is also the number of factors of the (n-1)-th degree polynomial ((x+1)^n-1)/x. Example: for n=6, ((x+1)^6-1)/x = x^5 + 6*x^4 + 15*x^3 + 20*x^2 + 15*x + 6 = (2+x)(1+x+x^2)(3+3x+x^2) implies a(6)=3. - Federico Provvedi, Oct 09 2018
REFERENCES
André Weil, Number Theory, An approach through history, From Hammurapi to Legendre, Birkhäuser, 1984, page 5.
LINKS
Eric Weisstein's World of Mathematics, Proper divisors.
FORMULA
a(n) = tau(n)-1 = A000005(n)-1. Cf. A039653.
G.f.: Sum_{n>=1} x^(2*n)/(1-x^n). - Michael Somos, Apr 29, 2003
G.f.: Sum_{i>=1} (1-x^i+x^(2*i))/(1-x^i). - Jon Perry, Jul 03 2004
a(n) = Sum_{k=1..floor(n/2)} A051731(n-k,k). - Reinhard Zumkeller, Nov 01 2009
G.f.: 2*Sum_{n>=1} Sum_{d|n} log(1 - x^(n/d))^(2*d) / (2*d)!. - Paul D. Hanna, Aug 21 2014
Dirichlet g.f.: zeta(s)*(zeta(s)-1). - Geoffrey Critzer, Dec 06 2014
a(n) = Sum_{k=1..n-1} binomial((n-1) mod k, k-1). - Wesley Ivan Hurt, Sep 26 2016
a(n) = Sum_{i=1..n-1} floor(n/i)-floor((n-1)/i). - Wesley Ivan Hurt, Nov 15 2017
a(n) = Sum_{i=1..n-1} 1-sign(i mod (n-i)). - Wesley Ivan Hurt, Sep 27 2018
Sum_{k=1..n} a(k) ~ n*log(n) + 2*(gamma - 1)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 27 2022
EXAMPLE
a(6) = 3 since the proper divisors of 6 are 1, 2, 3.
MAPLE
A032741 := proc(n)
if n = 0 then
0 ;
else
numtheory[tau](n)-1 ;
end if;
end proc: # R. J. Mathar, Feb 03 2013
MATHEMATICA
Prepend[DivisorSigma[0, Range[99]]-1, 0] (* Jayanta Basu, May 25 2013 *)
PROG
(PARI) a(n) = if(n<1, 0, numdiv(n)-1)
(PARI) {a(n)=polcoeff(2*sum(m=1, n\2+1, sumdiv(m, d, log(1-x^(m/d) +x*O(x^n) )^(2*d)/(2*d)!)), n)} \\ Paul D. Hanna, Aug 21 2014
(Haskell)
a032741 n = if n == 0 then 0 else a000005 n - 1
-- Reinhard Zumkeller, Jul 31 2014
(GAP) Concatenation([0], List([1..100], n->Tau(n)-1)); # Muniru A Asiru, Oct 09 2018
(Python)
from sympy import divisor_count
def A032741(n): return divisor_count(n)-1 if n else 0 # Chai Wah Wu, Mar 14 2023
CROSSREFS
Column 2 of A122934.
Cf. A003238, A001065, A027749, A027751 (list of proper divisors).
KEYWORD
nonn,easy
AUTHOR
_Patrick De Geest_, May 15 1998
EXTENSIONS
Typos in definition corrected by Omar E. Pol, Dec 13 2008
STATUS
approved
a(n) = n + (n+1)^2.
+10
188
1, 5, 11, 19, 29, 41, 55, 71, 89, 109, 131, 155, 181, 209, 239, 271, 305, 341, 379, 419, 461, 505, 551, 599, 649, 701, 755, 811, 869, 929, 991, 1055, 1121, 1189, 1259, 1331, 1405, 1481, 1559, 1639, 1721, 1805, 1891, 1979, 2069, 2161, 2255, 2351, 2449, 2549, 2651
OFFSET
0,2
COMMENTS
a(n+1) is the least k > a(n) + 1 such that A000217(a(n)) + A000217(k) is a square. - David Wasserman, Jun 30 2005
Values of Fibonacci polynomial n^2 - n - 1 for n = 2, 3, 4, 5, ... - Artur Jasinski, Nov 19 2006
A127701 * [1, 2, 3, ...]. - Gary W. Adamson, Jan 24 2007
Row sums of triangle A135223. - Gary W. Adamson, Nov 23 2007
Equals row sums of triangle A143596. - Gary W. Adamson, Aug 26 2008
a(n-1) gives the number of n X k rectangles on an n X n chessboard (for k = 1, 2, 3, ..., n). - Aaron Dunigan AtLee, Feb 13 2009
sqrt(a(0) + sqrt(a(1) + sqrt(a(2) + sqrt(a(3) + ...)))) = sqrt(1 + sqrt(5 + sqrt(11 + sqrt(19 + ...)))) = 2. - Miklos Kristof, Dec 24 2009
When n + 1 is prime, a(n) gives the number of irreducible representations of any nonabelian group of order (n+1)^3. - Andrew Rupinski, Mar 17 2010
a(n) = A176271(n+1, n+1). - Reinhard Zumkeller, Apr 13 2010
The product of any 4 consecutive integers plus 1 is a square (see A062938); the terms of this sequence are the square roots. - Harvey P. Dale, Oct 19 2011
Or numbers not expressed in the form m + floor(sqrt(m)) with integer m. - Vladimir Shevelev, Apr 09 2012
Left edge of the triangle in A214604: a(n) = A214604(n+1,1). - Reinhard Zumkeller, Jul 25 2012
Another expression involving phi = (1 + sqrt(5))/2 is a(n) = (n + phi)(n + 1 - phi). Therefore the numbers in this sequence, even if they are prime in Z, are not prime in Z[phi]. - Alonso del Arte, Aug 03 2013
a(n-1) = n*(n+1) - 1, n>=0, with a(-1) = -1, gives the values for a*c of indefinite binary quadratic forms [a, b, c] of discriminant D = 5 for b = 2*n+1. In general D = b^2 - 4ac > 0 and the form [a, b, c] is a*x^2 + b*x*y + c*y^2. - Wolfdieter Lang, Aug 15 2013
a(n) has prime factors given by A038872. - Richard R. Forberg, Dec 10 2014
A253607(a(n)) = -1. - Reinhard Zumkeller, Jan 05 2015
An example of a quadratic sequence for which the continued square root map (see A257574) produces the number 2. There are infinitely many sequences with this property - another example is A028387. See Popular Computing link. - N. J. A. Sloane, May 03 2015
Left edge of the triangle in A260910: a(n) = A260910(n+2,1). - Reinhard Zumkeller, Aug 04 2015
Numbers m such that 4m+5 is a square. - Bruce J. Nicholson, Jul 19 2017
The numbers represented as 131 in base n: 131_4 = 29, 131_5 = 41, ... . If 'digits' larger than the base are allowed then 131_2 = 11 and 131_1 = 5 also. - Ron Knott, Nov 14 2017
From Klaus Purath, Mar 18 2019: (Start)
Let m be a(n) or a prime factor of a(n). Then, except for 1 and 5, there are, if m is a prime, exactly two squares y^2 such that the difference y^2 - m contains exactly one pair of factors {x,z} such that the following applies: x*z = y^2 - m, x + y = z with
x < y, where {x,y,z} are relatively prime numbers. {x,y,z} are the initial values of a sequence of the Fibonacci type. Thus each a(n) > 5, if it is a prime, and each prime factor p > 5 of an a(n) can be assigned to exactly two sequences of the Fibonacci type. a(0) = 1 belongs to the original Fibonacci sequence and a(1) = 5 to the Lucas sequence.
But also the reverse assignment applies. From any sequence (f(i)) of the Fibonacci type we get from its 3 initial values by f(i)^2 - f(i-1)*f(i+1) with f(i-1) < f(i) a term a(n) or a prime factor p of a(n). This relation is also valid for any i. In this case we get the absolute value |a(n)| or |p|. (End)
a(n-1) = 2*T(n) - 1, for n>=1, with T = A000217, is a proper subsequence of A089270, and the terms are 0,-1,+1 (mod 5). - Wolfdieter Lang, Jul 05 2019
a(n+1) is the number of wedged n-dimensional spheres in the homotopy of the neighborhood complex of Kneser graph KG_{2,n}. Here, KG_{2,n} is a graph whose vertex set is the collection of subsets of cardinality 2 of set {1,2,...,n+3,n+4} and two vertices are adjacent if and only if they are disjoint. - Anurag Singh, Mar 22 2021
Also the number of squares between (n+2)^2 and (n+2)^4. - Karl-Heinz Hofmann, Dec 07 2021
(x, y, z) = (A001105(n+1), -a(n-1), -a(n)) are solutions of the Diophantine equation x^3 + 4*y^3 + 4*z^3 = 8. - XU Pingya, Apr 25 2022
The least significant digit of terms of this sequence cycles through 1, 5, 1, 9, 9. - Torlach Rush, Jun 05 2024
LINKS
Patrick De Geest, World!Of Numbers
Adalbert Kerber, A matrix of combinatorial numbers related to the symmetric groups<, Discrete Math., 21 (1978), 319-321. [Annotated scanned copy]
Clark Kimberling, Complementary Equations, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.4.
Nandini Nilakantan and Anurag Singh, Homotopy type of neighborhood complexes of Kneser graphs, KG_{2,k}, Proceeding-Mathematical Sciences, 128, Article number: 53(2018).
Yanni Pei and Jiang Zeng, Counting signed derangements with right-to-left minima and excedances, arXiv:2206.11236 [math.CO], 2022.
Popular Computing (Calabasas, CA), The CSR Function, Vol. 4 (No. 34, Jan 1976), pages PC34-10 to PC34-11. Annotated and scanned copy.
Zdzislaw Skupień and Andrzej Żak, Pair-sums packing and rainbow cliques, in Topics In Graph Theory, A tribute to A. A. and T. E. Zykovs on the occasion of A. A. Zykov's 90th birthday, ed. R. Tyshkevich, Univ. Illinois, 2013, pages 131-144, (in English and Russian).
FORMULA
a(n) = sqrt(A062938(n)). - Floor van Lamoen, Oct 08 2001
a(0) = 1, a(1) = 5, a(n) = (n+1)*a(n-1) - (n+2)*a(n-2) for n > 1. - Gerald McGarvey, Sep 24 2004
a(n) = A105728(n+2, n+1). - Reinhard Zumkeller, Apr 18 2005
a(n) = A109128(n+2, 2). - Reinhard Zumkeller, Jun 20 2005
a(n) = 2*T(n+1) - 1, where T(n) = A000217(n). - Gary W. Adamson, Aug 15 2007
a(n) = A005408(n) + A002378(n); A084990(n+1) = Sum_{k=0..n} a(k). - Reinhard Zumkeller, Aug 20 2007
Binomial transform of [1, 4, 2, 0, 0, 0, ...] = (1, 5, 11, 19, ...). - Gary W. Adamson, Sep 20 2007
G.f.: (1+2*x-x^2)/(1-x)^3. a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - R. J. Mathar, Jul 11 2009
a(n) = (n + 2 + 1/phi) * (n + 2 - phi); where phi = 1.618033989... Example: a(3) = 19 = (5 + .6180339...) * (3.381966...). Cf. next to leftmost column in A162997 array. - Gary W. Adamson, Jul 23 2009
a(n) = a(n-1) + 2*(n+1), with n > 0, a(0) = 1. - Vincenzo Librandi, Nov 18 2010
For k < n, a(n) = (k+1)*a(n-k) - k*a(n-k-1) + k*(k+1); e.g., a(5) = 41 = 4*11 - 3*5 + 3*4. - Charlie Marion, Jan 13 2011
a(n) = lower right term in M^2, M = the 2 X 2 matrix [1, n; 1, (n+1)]. - Gary W. Adamson, Jun 29 2011
G.f.: (x^2-2*x-1)/(x-1)^3 = G(0) where G(k) = 1 + x*(k+1)*(k+4)/(1 - 1/(1 + (k+1)*(k+4)/G(k+1)); (continued fraction, 3-step). - Sergei N. Gladkovskii, Oct 16 2012
Sum_{n>0} 1/a(n) = 1 + Pi*tan(sqrt(5)*Pi/2)/sqrt(5). - Enrique Pérez Herrero, Oct 11 2013
E.g.f.: exp(x) (1+4*x+x^2). - Tom Copeland, Dec 02 2013
a(n) = A005408(A000217(n)). - Tony Foster III, May 31 2016
From Amiram Eldar, Jan 29 2021: (Start)
Product_{n>=0} (1 + 1/a(n)) = -Pi*sec(sqrt(5)*Pi/2).
Product_{n>=1} (1 - 1/a(n)) = -Pi*sec(sqrt(5)*Pi/2)/6. (End)
a(5*n+1)/5 = A062786(n+1). - Torlach Rush, Jun 05 2024
EXAMPLE
From Ilya Gutkovskiy, Apr 13 2016: (Start)
Illustration of initial terms:
o o
o o o o o o
o o o o o o o o o o o o
o o o o o o o o o o o o o o o o o o o o
o o o o o o o o o o o o o o o o o o o o o o o o o
n=0 n=1 n=2 n=3 n=4
(End)
From Klaus Purath, Mar 18 2019: (Start)
Examples:
a(0) = 1: 1^1-0*1 = 1, 0+1 = 1 (Fibonacci A000045).
a(1) = 5: 3^2-1*4 = 5, 1+3 = 4 (Lucas A000032).
a(2) = 11: 4^2-1*5 = 11, 1+4 = 5 (A000285); 5^2-2*7 = 11, 2+5 = 7 (A001060).
a(3) = 19: 5^2-1*6 = 19, 1+5 = 6 (A022095); 7^2-3*10 = 19, 3+7 = 10 (A022120).
a(4) = 29: 6^2-1*7 = 29, 1+6 = 7 (A022096); 9^2-4*13 = 29, 4+9 = 13 (A022130).
a(11)/5 = 31: 7^2-2*9 = 31, 2+7 = 9 (A022113); 8^2-3*11 = 31, 3+8 = 11 (A022121).
a(24)/11 = 59: 9^2-2*11 = 59, 2+9 = 11 (A022114); 12^2-5*17 = 59, 5+12 = 17 (A022137).
(End)
MATHEMATICA
FoldList[## + 2 &, 1, 2 Range@ 45] (* Robert G. Wilson v, Feb 02 2011 *)
Table[n + (n + 1)^2, {n, 0, 100}] (* Vincenzo Librandi, Oct 17 2012 *)
Table[ FrobeniusNumber[{n, n + 1}], {n, 2, 30}] (* Zak Seidov, Jan 14 2015 *)
PROG
(Sage) [n+(n+1)^2 for n in range(0, 48)] # Zerinvary Lajos, Jul 03 2008
(Magma) [n + (n+1)^2: n in [0..60]]; // Vincenzo Librandi, Apr 26 2011
(PARI) a(n)=n^2+3*n+1 \\ Charles R Greathouse IV, Jun 10 2011
(Haskell)
a028387 n = n + (n + 1) ^ 2 -- Reinhard Zumkeller, Jul 17 2014
(Python) def a(n): return (n**2+3*n+1) # Torlach Rush, May 07 2024
CROSSREFS
Complement of A028392. Third column of array A094954.
Cf. A000217, A002522, A062392, A062786, A127701, A135223, A143596, A052905, A162997, A062938 (squares of this sequence).
A110331 and A165900 are signed versions.
Cf. A002327 (primes), A094210.
Frobenius number for k successive numbers: this sequence (k=2), A079326 (k=3), A138984 (k=4), A138985 (k=5), A138986 (k=6), A138987 (k=7), A138988 (k=8).
KEYWORD
nonn,easy
AUTHOR
_Patrick De Geest_
EXTENSIONS
Minor edits by N. J. A. Sloane, Jul 04 2010, following suggestions from the Sequence Fans Mailing List
STATUS
approved
Cubes of primes.
+10
180
8, 27, 125, 343, 1331, 2197, 4913, 6859, 12167, 24389, 29791, 50653, 68921, 79507, 103823, 148877, 205379, 226981, 300763, 357911, 389017, 493039, 571787, 704969, 912673, 1030301, 1092727, 1225043, 1295029, 1442897, 2048383, 2248091, 2571353, 2685619, 3307949
OFFSET
1,1
COMMENTS
Numbers with exactly three factorizations: A001055(a(n)) = 3 (e.g., a(4) = 1*343 = 7*49 = 7*7*7). - Reinhard Zumkeller, Dec 29 2001
Intersection of A014612 and A000578. Intersection of A014612 and A030513. - Wesley Ivan Hurt, Sep 10 2013
Let r(n) = (a(n)-1)/(a(n)+1) if a(n) mod 4 = 1, (a(n)+1)/(a(n)-1) otherwise; then Product_{n>=1} r(n) = (9/7) * (28/26) * (124/126) * (344/342) * (1332/1330) * ... = 48/35. - Dimitris Valianatos, Mar 06 2020
There exist 5 groups of order p^3, when p prime, so this is a subsequence of A054397. Three of them are abelian: C_p^3, C_p^2 X C_p and C_p X C_p X C_p = (C_p)^3. For 8 = 2^3, the 2 nonabelian groups are D_8 and Q_8; for odd prime p, the 2 nonabelian groups are (C_p x C_p) : C_p, and C_p^2 : C_p (remark, for p = 2, these two semi-direct products are isomorphic to D_8). Here C, D, Q mean Cyclic, Dihedral, Quaternion groups of the stated order; the symbols X and : mean direct and semidirect products respectively. - Bernard Schott, Dec 11 2021
REFERENCES
Edmund Landau, Elementary Number Theory, translation by Jacob E. Goodman of Elementare Zahlentheorie (Vol. I_1 (1927) of Vorlesungen über Zahlentheorie), by Edmund Landau, with added exercises by Paul T. Bateman and E. E. Kohlbecker, Chelsea Publishing Co., New York, 1958, pp. 31-32.
LINKS
Xavier Gourdon and Pascal Sebah, Some Constants from Number theory.
Eric Weisstein's World of Mathematics, Prime Power.
Wikipedia, p-group, Classification.
FORMULA
n such that A062799(n) = 3. - Benoit Cloitre, Apr 06 2002
a(n) = A000040(n)^3. - Omar E. Pol, Jul 27 2009
A064380(a(n)) = A000010(a(n)). - Vladimir Shevelev, Apr 19 2010
A003415(a(n)) = A079705(n). - Reinhard Zumkeller, Jun 26 2011
A056595(a(n)) = 2. - Reinhard Zumkeller, Aug 15 2011
A000005(a(n)) = 4. - Wesley Ivan Hurt, Sep 10 2013
a(n) = A119959(n) * A008864(n) -1.- R. J. Mathar, Aug 13 2019
Sum_{n>=1} 1/a(n) = P(3) = 0.1747626392... (A085541). - Amiram Eldar, Jul 27 2020
From Amiram Eldar, Jan 23 2021: (Start)
Product_{n>=1} (1 + 1/a(n)) = zeta(3)/zeta(6) (A157289).
Product_{n>=1} (1 - 1/a(n)) = 1/zeta(3) (A088453). (End)
EXAMPLE
a(3) = 125; since the 3rd prime is 5, a(3) = 5^3 = 125.
MATHEMATICA
Array[Prime[ # ]^3&, 5! ] (* Vladimir Joseph Stephan Orlovsky, Sep 01 2008 *)
PROG
(Sage)
[p**3 for p in prime_range(100)] # Zerinvary Lajos, May 15 2007
(Haskell)
a030078 = a000578 . a000040
a030078_list = map a000578 a000040_list -- Reinhard Zumkeller, May 26 2012
(PARI) a(n)=prime(n)^3 \\ Charles R Greathouse IV, Mar 20 2013
(Magma) [p^3: p in PrimesUpTo(300)]; // Vincenzo Librandi, Mar 27 2014
(Python)
from sympy import prime, primerange
def aupton(terms): return [p**3 for p in primerange(1, prime(terms)+1)]
print(aupton(35)) # Michael S. Branicky, Aug 27 2021
CROSSREFS
Other sequences that are k-th powers of primes are: A000040 (k=1), A001248 (k=2), this sequence (k=3), A030514 (k=4), A050997 (k=5), A030516 (k=6), A092759 (k=7), A179645 (k=8), A179665 (k=9), A030629 (k=10), A079395 (k=11), A030631 (k=12), A138031 (k=13), A030635 (k=16), A138032 (k=17), A030637 (k=18).
Cf. A060800, A131991, A000578, subsequence of A046099.
Subsequence of A007422 and of A054397.
KEYWORD
nonn,easy
AUTHOR
_Patrick De Geest_
STATUS
approved
Squares and twice squares.
+10
161
1, 2, 4, 8, 9, 16, 18, 25, 32, 36, 49, 50, 64, 72, 81, 98, 100, 121, 128, 144, 162, 169, 196, 200, 225, 242, 256, 288, 289, 324, 338, 361, 392, 400, 441, 450, 484, 512, 529, 576, 578, 625, 648, 676, 722, 729, 784, 800, 841, 882, 900, 961, 968, 1024
OFFSET
1,2
COMMENTS
Numbers n such that sum of divisors of n (A000203) is odd.
Also the numbers with an odd number of run sums (trapezoidal arrangements, number of ways of being written as the difference of two triangular numbers). - Ron Knott, Jan 27 2003
Pell(n)*Sum_{k|n} 1/Pell(k) is odd, where Pell(n) is A000129(n). - Paul Barry, Oct 12 2005
Number of odd divisors of n (A001227) is odd. - Vladeta Jovovic, Aug 28 2007
A071324(a(n)) is odd. - Reinhard Zumkeller, Jul 03 2008
Sigma(a(n)) = A000203(a(n)) = A152677(n). - Jaroslav Krizek, Oct 06 2009
Numbers n such that sum of odd divisors of n (A000593) is odd. - Omar E. Pol, Jul 05 2016
A187793(a(n)) is odd. - Timothy L. Tiffin, Jul 18 2016
If k is odd (k = 2m+1 for m >= 0), then 2^k = 2^(2m+1) = 2*(2^m)^2. If k is even (k = 2m for m >= 0), then 2^k = 2^(2m) = (2^m)^2. So, the powers of 2 sequence (A000079) is a subsequence of this one. - Timothy L. Tiffin, Jul 18 2016
Numbers n such that A175317(n) = Sum_{d|n} pod(d) is odd, where pod(m) = the product of divisors of m (A007955). - Jaroslav Krizek, Dec 28 2016
Positions of zeros in A292377 and A292383, positions of ones in A286357 and A292583. (See A292583 for why.) - Antti Karttunen, Sep 25 2017
Numbers of the form A000079(i)*A016754(j), i,j>=0. - R. J. Mathar, May 30 2020
Equivalently, numbers whose odd part is square. Cf. A042968. - Peter Munn, Jul 14 2020
These are the Heinz numbers of the partitions counted by A119620. - Gus Wiseman, Oct 29 2021
Numbers m whose abundance, A033880(m), is odd. - Peter Munn, May 23 2022
Numbers with an odd number of middle divisors (cf. A067742). - Omar E. Pol, Aug 02 2022
LINKS
Tewodros Amdeberhan, Victor H. Moll, Vaishavi Sharma, and Diego Villamizar, Arithmetic properties of the sum of divisors, arXiv:2007.03088 [math.NT], 2020. See p. 5.
J. N. Cooper and A. W. N. Riasanovsky, On the Reciprocal of the Binary Generating Function for the Sum of Divisors, Journal of Integer Sequences, Vol. 16 (2013), #13.1.8.
Patrick De Geest, World!Of Numbers
Eric Weisstein's World of Mathematics, Abundance
FORMULA
a(n) is asymptotic to c*n^2 with c = 2/(1+sqrt(2))^2 = 0.3431457.... - Benoit Cloitre, Sep 17 2002
In particular, a(n) = c*n^2 + O(n). - Charles R Greathouse IV, Jan 11 2013
a(A003152(n)) = n^2; a(A003151(n)) = 2*n^2. - Enrique Pérez Herrero, Oct 09 2013
Sum_{n>=1} 1/a(n) = Pi^2/4. - Amiram Eldar, Jun 28 2020
MATHEMATICA
Take[ Sort[ Flatten[ Table[{n^2, 2n^2}, {n, 35}] ]], 57] (* Robert G. Wilson v, Aug 27 2004 *)
PROG
(PARI) list(lim)=vecsort(concat(vector(sqrtint(lim\1), i, i^2), vector(sqrtint(lim\2), i, 2*i^2))) \\ Charles R Greathouse IV, Jun 16 2011
(Haskell)
import Data.List.Ordered (union)
a028982 n = a028982_list !! (n-1)
a028982_list = tail $ union a000290_list a001105_list
-- Reinhard Zumkeller, Jun 27 2015
(Python)
from itertools import count, islice
from sympy.ntheory.primetest import is_square
def A028982_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:int(is_square(n) or is_square(n<<1)), count(max(startvalue, 1)))
A028982_list = list(islice(A028982_gen(), 30)) # Chai Wah Wu, Jan 09 2023
(Python)
from math import isqrt
def A028982(n):
def f(x): return n-1+x-isqrt(x)-isqrt(x>>1)
kmin, kmax = 1, 2
while f(kmax) >= kmax:
kmax <<= 1
while True:
kmid = kmax+kmin>>1
if f(kmid) < kmid:
kmax = kmid
else:
kmin = kmid
if kmax-kmin <= 1:
break
return kmax # Chai Wah Wu, Aug 22 2024
CROSSREFS
Complement of A028983.
Characteristic function is A053866, A093709.
Odd terms in A178910.
Supersequence of A000079.
KEYWORD
nonn,easy
AUTHOR
_Patrick De Geest_
STATUS
approved
Odd semiprimes: odd numbers divisible by exactly 2 primes (counted with multiplicity).
+10
119
9, 15, 21, 25, 33, 35, 39, 49, 51, 55, 57, 65, 69, 77, 85, 87, 91, 93, 95, 111, 115, 119, 121, 123, 129, 133, 141, 143, 145, 155, 159, 161, 169, 177, 183, 185, 187, 201, 203, 205, 209, 213, 215, 217, 219, 221, 235, 237, 247, 249, 253, 259, 265, 267, 287, 289
OFFSET
1,1
COMMENTS
In general, the prime factors, p, of a(n) are given by: p = sqrt(a(n) + (k/2)^2) +- (k/2) where k is the positive difference of the prime factors. Equivalently, p = (1/2)( sqrt(4a(n) + k^2) +- k ). - Wesley Ivan Hurt, Jun 28 2013
LINKS
Zak Seidov and K. D. Bajpai, Table of n, a(n) for n = 1..10000 (first 1956 terms from Zak Seidov)
FORMULA
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 + P(2*s)) - P(s)/2^s, for s>1, where P is the prime zeta function. - Amiram Eldar, Nov 21 2020
EXAMPLE
From K. D. Bajpai, Jul 05 2014: (Start)
15 is a term because it is an odd number and 15 = 3 * 5, which is semiprime.
39 is a term because it is an odd number and 39 = 3 * 13, which is semiprime. (End)
MAPLE
A046315 := proc(n) option remember; local r;
if n = 1 then RETURN(9) fi;
for r from procname(n - 1) + 2 by 2 do
if numtheory[bigomega](r) = 2 then
RETURN(r)
end if
end do
end proc:
seq(A046315(n), n=1..56); # Peter Luschny, Feb 15 2011
MATHEMATICA
Reap[Do[If[Total[FactorInteger[n]][[2]] == 2, Sow[n]], {n, 1, 400, 2}]][[2, 1]] (* Zak Seidov *)
fQ[n_] := Plus @@ Last /@ FactorInteger@ n == 2; Select[2 Range@ 150 - 1, fQ] (* Robert G. Wilson v, Feb 15 2011 *)
Select[Range[5, 301, 2], PrimeOmega[#]==2&] (* Harvey P. Dale, May 22 2015 *)
PROG
(PARI) list(lim)=my(u=primes(primepi(lim\3)), v=List(), t); for(i=2, #u, for(j=i, #u, t=u[i]*u[j]; if(t>lim, break); listput(v, t))); vecsort(Vec(v)) \\ Charles R Greathouse IV, Jul 19 2011
(Haskell)
a046315 n = a046315_list !! (n-1)
a046315_list = filter odd a001358_list -- Reinhard Zumkeller, Jan 02 2014
(Python)
from math import isqrt
from sympy import primepi, primerange
def A046315(n):
def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//k) for k in primerange(3, s+1)))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Aug 17 2024
CROSSREFS
Odd members of A001358.
A046388 is a subsequence.
Cf. A085770 (number of odd semiprimes < 10^n). - Robert G. Wilson v, Aug 25 2011
KEYWORD
nonn
AUTHOR
_Patrick De Geest_, Jun 15 1998
STATUS
approved
Numbers that are congruent to 0 or 1 (mod 3).
+10
113
0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 21, 22, 24, 25, 27, 28, 30, 31, 33, 34, 36, 37, 39, 40, 42, 43, 45, 46, 48, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 67, 69, 70, 72, 73, 75, 76, 78, 79, 81, 82, 84, 85, 87, 88, 90, 91, 93, 94, 96, 97, 99, 100, 102, 103
OFFSET
0,3
COMMENTS
Omitting the initial 0, a(n) is the number of 1's in the n-th row of the triangle in A118111. - Hans Havermann, May 26 2002
Binomial transform is A053220. - Michael Somos, Jul 10 2003
Smallest number of different people in a set of n-1 photographs that satisfies the following conditions: In each photograph there are 3 women, the woman in the middle is the mother of the person on her left and is a sister of the person on her right and the women in the middle of the photographs are all different. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Partial sums of A000034. - Richard Choulet, Jan 28 2010
Starting with 1 = row sums of triangle A171370. - Gary W. Adamson, Feb 15 2010
a(n) is the set of values for m in which 6k + m can be a perfect square (quadratic residues of 6 including trivial case of 0). - Gary Detlefs, Mar 19 2010
For n >= 2, a(n) is the smallest number with n as an anti-divisor. - Franklin T. Adams-Watters, Oct 28 2011
Sequence is also the maximum number of floors with 3 elevators and n stops in a "Convenient Building". See A196592 and Erich Friedman link below. - Robert Price, May 30 2013
a(n) is also the total number of coins left after packing 4-curves patterns (4c2) into a fountain of coins base n. The total number of 4c2 is A002620 and voids left is A000982. See illustration in links. - Kival Ngaokrajang, Oct 26 2013
Number of partitions of 6n into two even parts. - Wesley Ivan Hurt, Nov 15 2014
Number of partitions of 3n into exactly 2 parts. - Colin Barker, Mar 23 2015
Nonnegative m such that floor(2*m/3) = 2*floor(m/3). - Bruno Berselli, Dec 09 2015
For n >= 3, also the independence number of the n-web graph. - Eric W. Weisstein, Dec 31 2015
Equivalently, nonnegative numbers m for which m*(m+2)/3 and m*(m+5)/6 are integers. - Bruno Berselli, Jul 18 2016
Also the clique covering number of the n-Andrásfai graph for n > 0. - Eric W. Weisstein, Mar 26 2018
Maximum sum of degeneracies over all decompositions of the complete graph of order n+1 into three factors. The extremal decompositions are characterized in the Bickle link below. - Allan Bickle, Dec 21 2021
Also the Hadwiger number of the n-cocktail party graph. - Eric W. Weisstein, Apr 30 2022
LINKS
Allan Bickle, Nordhaus-Gaddum Theorems for k-Decompositions, Congr. Num. 211 (2012) 171-183.
F. Javier de Vega, An extension of Furstenberg's theorem of the infinitude of primes, arXiv:2003.13378 [math.NT], 2020.
Z. Füredi, A. Kostochka, M. Stiebitz, R. Skrekovski, and D. West, Nordhaus-Gaddum-type theorems for decompositions into many parts, J. Graph Theory 50 (2005), 273-292.
Andreas M. Hinz, Sandi Klavžar, Uroš Milutinović and Ciril Petr, The Tower of Hanoi - Myths and Maths, Birkhäuser 2013. See page 282. [Book's website]
Hsien-Kuei Hwang, S. Janson and T.-H. Tsai, Exact and Asymptotic Solutions of a Divide-and-Conquer Recurrence Dividing at Half: Theory and Applications, ACM Transactions on Algorithms, 13:4 (2017), #47; DOI: 10.1145/3127585.
International Mathematical Olympiad 2001, Hong Kong Preliminary Selection Contest, Problem #20. [Broken link; Cached copy]
Emanuele Munarini, Topological indices for the antiregular graphs, Le Mathematiche, Vol. 76, No. 1 (2021), pp. 277-310, see p. 302.
Eric Weisstein's World of Mathematics, Andrásfai Graph
Eric Weisstein's World of Mathematics, Clique Covering Number
Eric Weisstein's World of Mathematics, Cocktail Party Graph
Eric Weisstein's World of Mathematics, Hadwiger Number
Eric Weisstein's World of Mathematics, Independence Number
Eric Weisstein's World of Mathematics, Web Graph
FORMULA
G.f.: x*(1+2*x)/((1-x)*(1-x^2)).
a(-n) = -A007494(n).
a(n) = A049615(n, 2), for n > 2.
From Paul Barry, Sep 04 2003: (Start)
a(n) = (6n - 1 + (-1)^n)/4.
a(n) = floor((3n + 2)/2) - 1 = A001651(n) - 1.
a(n) = sqrt(2) * sqrt( (6n-1) (-1)^n + 18n^2 - 6n + 1 )/4.
a(n) = Sum_{k=0..n} 3/2 - 2*0^k + (-1)^k/2. (End)
a(n) = 3*floor(n/2) + (n mod 2) = A007494(n) - A000035(n). - Reinhard Zumkeller, Apr 04 2005
a(n) = 2 * A004526(n) + A004526(n+1). - Philippe Deléham, Aug 07 2006
a(n) = 1 + ceiling(3*(n-1)/2). - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
Row sums of triangle A133083. - Gary W. Adamson, Sep 08 2007
a(n) = (cos(Pi*n) - 1)/4 + 3*n/2. - Bart Snapp (snapp(AT)coastal.edu), Sep 18 2008
A004396(a(n)) = n. - Reinhard Zumkeller, Oct 30 2009
a(n) = floor(n/2) + n. - Gary Detlefs, Mar 19 2010
a(n) = 3n - a(n-1) - 2, for n>0, a(0)=0. - Vincenzo Librandi, Nov 19 2010
a(n) = n + (n-1) - (n-2) + (n-3) - ... 1 = A052928(n) + A008619(n-1). - Jaroslav Krizek, Mar 22 2011
a(n) = a(n-1) + a(n-2) - a(n-3). - Robert G. Wilson v, Mar 28 2011
a(n) = Sum_{k>=0} A030308(n,k) * A003945(k). - Philippe Deléham, Oct 17 2011
a(n) = 2n - ceiling(n/2). - Wesley Ivan Hurt, Oct 25 2013
a(n) = A000217(n) - 2 * A002620(n-1). - Kival Ngaokrajang, Oct 26 2013
a(n) = Sum_{i=1..n} gcd(i, 2). - Wesley Ivan Hurt, Jan 23 2014
a(n) = 2n + floor((-n - (n mod 2))/2). - Wesley Ivan Hurt, Mar 31 2014
A092942(a(n)) = n for n > 0. - Reinhard Zumkeller, Dec 13 2014
a(n) = floor(3*n/2). - L. Edson Jeffery, Jan 18 2015
a(n) = A254049(A249745(n)) = (1+A007310(n)) / 2 for n >= 1. - Antti Karttunen, Jan 24 2015
E.g.f.: (3*x*exp(x) - sinh(x))/2. - Ilya Gutkovskiy, Jul 18 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(6*sqrt(3)) + log(3)/2. - Amiram Eldar, Dec 04 2021
MAPLE
a[0]:=0:a[1]:=1:for n from 2 to 100 do a[n]:=a[n-2]+3 od: seq(a[n], n=0..69); # Zerinvary Lajos, Mar 16 2008
seq(floor(n/2)+n, n=0..69); # Gary Detlefs, Mar 19 2010
select(n->member(n mod 3, {0, 1}), [$0..103]); # Peter Luschny, Apr 06 2014
MATHEMATICA
a[n_] := a[n] = 2a[n - 1] - 2a[n - 3] + a[n - 4]; a[0] = 0; a[1] = 1; a[2] = 3; a[3] = 4; Array[a, 60, 0] (* Robert G. Wilson v, Mar 28 2011 *)
Select[Range[0, 200], MemberQ[{0, 1}, Mod[#, 3]] &] (* Vladimir Joseph Stephan Orlovsky, Feb 11 2012 *)
Flatten[{#, #+1}&/@(3Range[0, 40])] (* or *) LinearRecurrence[{1, 1, -1}, {0, 1, 3}, 100] (* or *) With[{nn=110}, Complement[Range[0, nn], Range[2, nn, 3]]] (* Harvey P. Dale, Mar 10 2013 *)
CoefficientList[Series[x (1 + 2 x) / ((1 - x) (1 - x^2)), {x, 0, 100}], x] (* Vincenzo Librandi, Nov 16 2014 *)
Floor[3 Range[0, 69]/2] (* L. Edson Jeffery, Jan 14 2017 *)
Drop[Range[0, 110], {3, -1, 3}] (* Harvey P. Dale, Sep 02 2023 *)
PROG
(PARI) {a(n) = n + n\2}
(Magma) &cat[ [n, n+1]: n in [0..100 by 3] ]; // Vincenzo Librandi, Nov 16 2014
(Haskell)
a032766 n = div n 2 + n -- Reinhard Zumkeller, Dec 13 2014
(MIT/GNU Scheme) (define (A032766 n) (+ n (floor->exact (/ n 2)))) ;; Antti Karttunen, Jan 24 2015
(PARI) concat(0, Vec(x*(1+2*x)/((1-x)*(1-x^2)) + O(x^100))) \\ Altug Alkan, Dec 09 2015
(SageMath) [int(3*n//2) for n in range(101)] # G. C. Greubel, Jun 23 2024
CROSSREFS
Cf. A006578 (partial sums), A000034 (first differences), A016789 (complement).
Essentially the same: A049624.
Column 1 (the second leftmost) of triangular table A026374.
Column 1 (the leftmost) of square array A191450.
Row 1 of A254051.
Row sums of A171370.
Cf. A066272 for anti-divisors.
Cf. A253888 and A254049 (permutations of this sequence without the initial zero).
Cf. A254103 and A254104 (pair of permutations based on this sequence and its complement).
KEYWORD
nonn,easy,nice
AUTHOR
_Patrick De Geest_, May 15 1998
EXTENSIONS
Better description from N. J. A. Sloane, Aug 01 1998
STATUS
approved
Odd numbers of the form p*q where p and q are distinct primes.
+10
92
15, 21, 33, 35, 39, 51, 55, 57, 65, 69, 77, 85, 87, 91, 93, 95, 111, 115, 119, 123, 129, 133, 141, 143, 145, 155, 159, 161, 177, 183, 185, 187, 201, 203, 205, 209, 213, 215, 217, 219, 221, 235, 237, 247, 249, 253, 259, 265, 267, 287, 291, 295, 299, 301, 303
OFFSET
1,1
COMMENTS
These are the odd squarefree semiprimes.
These numbers k have the property that k is a Fermat pseudoprime for at least two bases 1 < b < k - 1. That is, b^(k - 1) == 1 (mod k). See sequence A175101 for the number of bases. - Karsten Meyer, Dec 02 2010
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
FORMULA
Sum_{n>=1} 1/a(n)^s = (1/2)*(P(s)^2 - P(2*s)) + 1/4^s - P(s)/2^s, for s>1, where P is the prime zeta function. - Amiram Eldar, Nov 21 2020
MATHEMATICA
max = 300; A046388 = Sort@Flatten@Table[Prime[m] Prime[n], {n, 3, Ceiling[PrimePi[max/3]]}, {m, 2, n - 1}]; Select[A046388, # < max &] (* Alonso del Arte based on Robert G. Wilson v's program for A006881, Oct 24 2011 *)
PROG
(Haskell)
a046388 n = a046388_list !! (n-1)
a046388_list = filter ((== 2) . a001221) a056911_list
-- Reinhard Zumkeller, Jan 02 2014
(PARI) isok(n) = (n % 2) && (bigomega(n) == 2) && (omega(n)==2); \\ Michel Marcus, Feb 05 2015
(Python)
from sympy import factorint
def ok(n):
if n < 2 or n%2 == 0: return False
f = factorint(n)
return len(f) == 2 and sum(f.values()) == 2
print([k for k in range(304) if ok(k)]) # Michael S. Branicky, May 03 2022
(Python)
from math import isqrt
from sympy import primepi, primerange
def A046388(n):
if n == 1: return 15
def f(x): return int(n-1+x+(t:=primepi(s:=isqrt(x)))+(t*(t-1)>>1)-sum(primepi(x//k) for k in primerange(3, s+1)))
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
return bisection(f, n, n) # Chai Wah Wu, Sep 10 2024
CROSSREFS
Intersection of A005117 and A046315, or equally, of A005408 and A006881, or of A001358 and A056911.
Union of A080774 and A190299, which the latter is the union of A131574 and A016105.
Subsequence of A024556 and of A225375.
Cf. A353481 (characteristic function).
Different from A056913, A098905, A225375.
KEYWORD
nonn
AUTHOR
_Patrick De Geest_, Jun 15 1998
EXTENSIONS
I removed some ambiguity in the definition and edited the entry, merging in some material from A146166. - N. J. A. Sloane, May 09 2013
STATUS
approved
Primes whose binary representation is also the decimal representation of a prime.
+10
86
3, 5, 23, 47, 89, 101, 149, 157, 163, 173, 179, 199, 229, 313, 331, 367, 379, 383, 443, 457, 523, 587, 631, 643, 647, 653, 659, 709, 883, 947, 997, 1009, 1091, 1097, 1163, 1259, 1277, 1283, 1289, 1321, 1483, 1601, 1669, 1693, 1709, 1753, 1877, 2063, 2069, 2099
OFFSET
1,1
COMMENTS
In general rebase notation (Marc LeBrun): p2 = (2) [p] (10).
Also: Primes in A036952. - M. F. Hasler, Dec 11 2012
See A089971 for the binary representation of these terms. - M. F. Hasler, Jan 05 2014
LINKS
Harry J. Smith and K. D. Bajpai, Table of n, a(n) for n = 1..10000 (first 1000 terms from Harry J. Smith)
Carlos Rivera, Puzzle 280. 3893257, The Prime Puzzles & Problems Connection.
FORMULA
Equals A036952 intersect A000040. - M. F. Hasler, Dec 11 2012
EXAMPLE
1009{10} = 1111110001{2} is prime, and 1111110001{10} is also prime.
89 is in the sequence because it is a prime. Binary representation of 89 = 1011001, which is also a prime.
MAPLE
select(t -> isprime(t) and isprime(convert(t, binary)), [seq(2*i+1, i=1..1000)]); # Robert Israel, Jul 08 2014
MATHEMATICA
Select[ Range[1900], PrimeQ[ # ] && PrimeQ[ FromDigits[ IntegerDigits[ #, 2]]] & ]
Select[ Prime@ Range@ 330, PrimeQ[ FromDigits[ IntegerDigits[#, 2]]] &] (* Robert G. Wilson v, Oct 09 2014 *)
PROG
(PARI) {(baseE(x, b)= local(d, e=0, f=1); while (x>0, d=x-b*(x\b); x\=b; e+=d*f; f*=10); e); n=0; for (m=1, 10^9, p=prime(m); b=baseE(p, 2); if (isprime(b), write("b065720.txt", n++, " ", p); if (n==1000, return)) ) } \\ Harry J. Smith, Oct 27 2009
(PARI) isok(p) = isprime(p) && isprime(fromdigits(binary(p), 10)); \\ Michel Marcus, Mar 04 2022
(Python)
from sympy import isprime
def ok(n): return isprime(n) and isprime(int(bin(n)[2:]))
print([k for k in range(2100) if ok(k)]) # Michael S. Branicky, Mar 04 2022
KEYWORD
nonn,base
AUTHOR
_Patrick De Geest_, Nov 15 2001
EXTENSIONS
a(48)-a(50) from K. D. Bajpai, Jul 04 2014
STATUS
approved
If n is semiprime (or 2-almost prime) then 1 else 0.
+10
77
0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65545 (first 10000 terms from Reinhard Zumkeller)
Eric Weisstein's World of Mathematics, Semiprime
Eric Weisstein's World of Mathematics, Prime zeta function primezeta(s).
FORMULA
a(n) = 1 iff n is in A001358 (semiprimes), a(n) = 0 iff n is in A100959 (non-semiprimes). - Reinhard Zumkeller, Nov 24 2004
Dirichlet g.f.: (primezeta(2s) + primezeta(s)^2)/2. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = A057427(A174956(n)); a(n)*A072000(n) = A174956(n). - Reinhard Zumkeller, Apr 03 2010
a(n) = A010051(A032742(n)) (i.e., largest proper divisor is prime). - Reinhard Zumkeller, Mar 13 2011
From Antti Karttunen, Apr 24 2018 & Apr 22 2022: (Start)
a(n) = A280710(n) + A302048(n) = A101040(n) - A010051(n).
a(n) = A353478(n) + A353480(n) = A353477(n) + A353478(n) + A353479(n).
a(n) = A353475(n) + A353476(n).
(End)
MAPLE
with(numtheory):
a:= n-> `if`(bigomega(n)=2, 1, 0):
seq(a(n), n=1..120); # Alois P. Heinz, Mar 16 2011
MATHEMATICA
Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
PROG
(Haskell) a064911 = a010051 . a032742 -- Reinhard Zumkeller, Mar 13 2011
(PARI) a(n)=bigomega(n)==2 \\ Charles R Greathouse IV, Mar 13 2011
KEYWORD
nonn
AUTHOR
_Patrick De Geest_, Oct 13 2001
EXTENSIONS
Edited by M. F. Hasler, Oct 18 2017
STATUS
approved

Search completed in 1.409 seconds