Displaying 1-10 of 2271 results found.
page
1
2
3
4
5
6
7
8
9
10
... 228
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
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
FORMULA
Other identities and observations:
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.
(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
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
(Haskell)
(Python)
from sympy import factorint
def a(n): return 1 if n == 1 else n//min(factorint(n))
CROSSREFS
Cf. A002110, A002808, A005867, A006530, A008578, A020639, A032741, A003961, A052126, A054576, A055396, A060681, A068319, A063928, A130064, A246277, A250245, A250246, A276085, A276086, A276151, A286477, A300236, A302025, A302026, A302032, A302042, A325563, A325567.
AUTHOR
_Patrick De Geest_, May 15 1998
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
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+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.
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.
FORMULA
G.f.: Sum_{i>=1} (1-x^i+x^(2*i))/(1-x^i). - Jon Perry, Jul 03 2004
G.f.: 2*Sum_{n>=1} Sum_{d|n} log(1 - x^(n/d))^(2*d) / (2*d)!. - Paul D. Hanna, Aug 21 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
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
if n = 0 then
0 ;
else
numtheory[tau](n)-1 ;
end if;
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
(GAP) Concatenation([0], List([1..100], n->Tau(n)-1)); # Muniru A Asiru, Oct 09 2018
(Python)
from sympy import divisor_count
AUTHOR
_Patrick De Geest_, May 15 1998
EXTENSIONS
Typos in definition corrected by Omar E. Pol, Dec 13 2008
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
COMMENTS
Values of Fibonacci polynomial n^2 - n - 1 for n = 2, 3, 4, 5, ... - Artur Jasinski, Nov 19 2006
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
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
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
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
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
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
(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
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(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
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
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
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)
EXAMPLE
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)
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
Table[ FrobeniusNumber[{n, n + 1}], {n, 2, 30}] (* Zak Seidov, Jan 14 2015 *)
PROG
(Haskell)
(Python) def a(n): return (n**2+3*n+1) # Torlach Rush, May 07 2024
EXTENSIONS
Minor edits by N. J. A. Sloane, Jul 04 2010, following suggestions from the Sequence Fans Mailing List
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
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
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
Wikipedia, p-group, Classification.
FORMULA
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.
PROG
(Sage)
(Haskell)
a030078 = a000578 . a000040
(Python)
from sympy import prime, primerange
def aupton(terms): return [p**3 for p in primerange(1, prime(terms)+1)]
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).
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
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
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
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
LINKS
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
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
(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)))
(Python)
from math import isqrt
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
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
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
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
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:
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)
(Python)
from math import isqrt
from sympy import primepi, primerange
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)
AUTHOR
_Patrick De Geest_, Jun 15 1998
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
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
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
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
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 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
Eric Weisstein's World of Mathematics, Web Graph
FORMULA
G.f.: x*(1+2*x)/((1-x)*(1-x^2)).
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) = 1 + ceiling(3*(n-1)/2). - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Sep 22 2006
a(n) = (cos(Pi*n) - 1)/4 + 3*n/2. - Bart Snapp (snapp(AT)coastal.edu), Sep 18 2008
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
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 *)
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 *)
PROG
(PARI) {a(n) = n + n\2}
(Haskell)
(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
Column 1 (the second leftmost) of triangular table A026374.
Column 1 (the leftmost) of square array A191450.
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).
AUTHOR
_Patrick De Geest_, May 15 1998
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
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
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
PROG
(Haskell)
a046388 n = a046388_list !! (n-1)
a046388_list = filter ((== 2) . a001221) a056911_list
(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
(Python)
from math import isqrt
from sympy import primepi, primerange
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
CROSSREFS
Cf. A353481 (characteristic function).
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
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
COMMENTS
In general rebase notation (Marc LeBrun): p2 = (2) [p] (10).
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:]))
AUTHOR
_Patrick De Geest_, Nov 15 2001
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
LINKS
Eric Weisstein's World of Mathematics, Semiprime
MAPLE
with(numtheory):
a:= n-> `if`(bigomega(n)=2, 1, 0):
MATHEMATICA
Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
CROSSREFS
Cf. A010051, A064899- A064910, A053409, A046413, A101040, A105700, A280710, A302047, A302048, A302049, A353475, A353476, A353477, A353478, A353479, A353480, A353481.
AUTHOR
_Patrick De Geest_, Oct 13 2001
Search completed in 1.409 seconds
|