A005117
Squarefree numbers: numbers that are not divisible by a square greater than 1.
Original entry on oeis.org
1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19, 21, 22, 23, 26, 29, 30, 31, 33, 34, 35, 37, 38, 39, 41, 42, 43, 46, 47, 51, 53, 55, 57, 58, 59, 61, 62, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 82, 83, 85, 86, 87, 89, 91, 93, 94, 95, 97, 101, 102, 103, 105, 106, 107, 109, 110, 111, 113
Offset: 1
- Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 165, p. 53, Ellipses, Paris, 2008.
- David S. Dummit and Richard M. Foote, Abstract algebra. Vol. 1999. Englewood Cliffs, NJ: David S.Prentice Hall, 1991.
- Ivan M. Niven and Herbert S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 251.
- Michael Pohst and Hans J. Zassenhaus, Algorithmic Algebraic Number Theory, Cambridge Univ. Press, page 432.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Daniel Forgues, Table of n, a(n) for n = 1..60794 (first 10000 terms from T. D. Noe)
- Zenon B. Batang, Squarefree integers and the abc conjecture, arXiv:2109.10226 [math.GM], 2021.
- Andrew R. Booker, Ghaith A. Hiary and Jon P. Keating, Detecting squarefree numbers, Duke Mathematical Journal, Vol. 164, No. 2 (2015), pp. 235-275; arXiv preprint, arXiv:1304.6937 [math.NT], 2013-2015.
- Iurie Boreico, Linear independence of radicals, The Harvard College Mathematics Review 2(1), 87-92, Spring 2008.
- Ernesto Cesàro, La serie di Lambert in aritmetica assintotica, Rendiconto della Reale Accademia delle Scienze di Napoli, Serie 2, Vol. 7 (1893), pp. 197-204.
- Henri Cohen, Francois Dress, and Mohamed El Marraki, Explicit estimates for summatory functions linked to the Möbius μ-function, Functiones et Approximatio Commentarii Mathematici 37 (2007), part 1, pp. 51-63.
- H. Gent, Letter to N. J. A. Sloane, Nov 27 1975.
- Andrew Granville, ABC means we can count squarefrees, International Mathematical Research Notices 19 (1998), 991-1009.
- Pentti Haukkanen, Mika Mattila, Jorma K. Merikoski and Timo Tossavainen, Can the Arithmetic Derivative be Defined on a Non-Unique Factorization Domain?, Journal of Integer Sequences, Vol. 16 (2013), Article 13.1.2.
- Aaron Krowne, squarefree number, PlanetMath.org.
- Louis Marmet, First occurrences of squarefree gaps and an algorithm for their computation.
- Louis Marmet, First occurrences of square-free gaps and an algorithm for their computation, arXiv preprint arXiv:1210.3829 [math.NT], 2012.
- Srinivasa Ramanujan, Irregular numbers, J. Indian Math. Soc., Vol. 5 (1913), pp. 105-106.
- Kenneth Rogers, The Schnirelmann density of the squarefree integers, Proceedings of the American Mathematical Society, Vol. 15, No. 4 (1964), pp. 515-516.
- J. A. Scott, Square-freedom revisited, The Mathematical Gazette, Vol. 90, No. 517 (2006), pp. 112-113.
- Vladimir Shevelev, Set of all densities of exponentially S-numbers, arXiv preprint arXiv:1511.03860 [math.NT], 2015.
- O. Trifonov, On the Squarefree Problem II, Math. Balkanica, Vol. 3 (1989), Fasc. 3-4.
- Eric Weisstein's World of Mathematics, Squarefree.
- Eric Weisstein's World of Mathematics, Prime Zeta Function.
- Wikipedia, Squarefree integer.
- Index entries for "core" sequences.
Cf.
A001414,
A008472,
A076259 (first differences),
A173143 (partial sums),
A000688,
A003277,
A013928,
A020753,
A020754,
A020755,
A030059,
A030229,
A033197,
A034444,
A039956,
A048672,
A053797,
A057918,
A059956,
A071403,
A072284,
A120992,
A133466,
A136742,
A136743,
A160764,
A243289,
A243347,
A243348,
A243351,
A215366,
A046660,
A265668,
A265675.
-
a005117 n = a005117_list !! (n-1)
a005117_list = filter ((== 1) . a008966) [1..]
-- Reinhard Zumkeller, Aug 15 2011, May 10 2011
-
[ n : n in [1..1000] | IsSquarefree(n) ];
-
with(numtheory); a := [ ]; for n from 1 to 200 do if issqrfree(n) then a := [ op(a), n ]; fi; od:
t:= n-> product(ithprime(k),k=1..n): for n from 1 to 113 do if(t(n) mod n = 0) then print(n) fi od; # Gary Detlefs, Dec 07 2011
A005117 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if numtheory[issqrfree](a) then return a; end if; end do: end if; end proc: # R. J. Mathar, Jan 09 2013
-
Select[ Range[ 113], SquareFreeQ] (* Robert G. Wilson v, Jan 31 2005 *)
Select[Range[150], Max[Last /@ FactorInteger[ # ]] < 2 &] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 26 2006 *)
NextSquareFree[n_, k_: 1] := Block[{c = 0, sgn = Sign[k]}, sf = n + sgn; While[c < Abs[k], While[ ! SquareFreeQ@ sf, If[sgn < 0, sf--, sf++]]; If[ sgn < 0, sf--, sf++]; c++]; sf + If[ sgn < 0, 1, -1]]; NestList[ NextSquareFree, 1, 70] (* Robert G. Wilson v, Apr 18 2014 *)
Select[Range[250], MoebiusMu[#] != 0 &] (* Robert D. Rosales, May 20 2024 *)
-
bnd = 1000; L = vector(bnd); j = 1; for (i=1,bnd, if(issquarefree(i),L[j]=i; j=j+1)); L
-
{a(n)= local(m,c); if(n<=1,n==1, c=1; m=1; while( cMichael Somos, Apr 29 2005 */
-
list(n)=my(v=vectorsmall(n,i,1),u,j); forprime(p=2,sqrtint(n), forstep(i=p^2, n, p^2, v[i]=0)); u=vector(sum(i=1,n,v[i])); for(i=1,n,if(v[i],u[j++]=i)); u \\ Charles R Greathouse IV, Jun 08 2012
-
for(n=1, 113, if(core(n)==n, print1(n, ", "))); \\ Arkadiusz Wesolowski, Aug 02 2016
-
S(n) = my(s); forsquarefree(k=1,sqrtint(n),s+=n\k[1]^2*moebius(k)); s;
a(n) = my(min=1, max=231, k=0, sc=0); if(n >= 144, min=floor(zeta(2)*n - 5*sqrt(n)); max=ceil(zeta(2)*n + 5*sqrt(n))); while(min <= max, k=(min+max)\2; sc=S(k); if(abs(sc-n) <= sqrtint(n), break); if(sc > n, max=k-1, if(sc < n, min=k+1, break))); while(!issquarefree(k), k-=1); while(sc != n, my(j=1); if(sc > n, j = -1); k += j; sc += j; while(!issquarefree(k), k += j)); k; \\ Daniel Suteu, Jul 07 2022
-
first(n)=my(v=vector(n),i); forsquarefree(k=1,if(n<268293,(33*n+30)\20,(n*Pi^2/6+0.058377*sqrt(n))\1), if(i++>n, return(v)); v[i]=k[1]); v \\ Charles R Greathouse IV, Jan 10 2023
-
A5117=[1..3]; A005117(n)={if(n>#A5117, my(N=#A5117); A5117=Vec(A5117, max(n+999, N*5\4)); iferr(forsquarefree(k=A5117[N]+1, #A5117*Pi^2\6+sqrtint(#A5117)\17+11, A5117[N++]=k[1]),E,)); A5117[n]} \\ M. F. Hasler, Aug 08 2025
-
from sympy.ntheory.factor_ import core
def ok(n): return core(n, 2) == n
print(list(filter(ok, range(1, 114)))) # Michael S. Branicky, Jul 31 2021
-
from itertools import count, islice
from sympy import factorint
def A005117_gen(startvalue=1): # generator of terms >= startvalue
return filter(lambda n:all(x == 1 for x in factorint(n).values()),count(max(startvalue,1)))
A005117_list = list(islice(A005117_gen(),20)) # Chai Wah Wu, May 09 2022
-
from math import isqrt
from sympy import mobius
def A005117(n):
def f(x): return n+x-sum(mobius(k)*(x//k**2) for k in range(1, isqrt(x)+1))
m, k = n, f(n)
while m != k:
m, k = k, f(k)
return m # Chai Wah Wu, Jul 22 2024
Original entry on oeis.org
3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472, 6442450944, 12884901888
Offset: 0
- Jason I. Brown, Discrete Structures and Their Interactions, CRC Press, 2013, p. 71.
- T. Ito, Method, equipment, program and storage media for producing tables, Publication number JP2004-272104A, Japan Patent Office (written in Japanese, a(2)=12, a(3)=24, a(4)=48, a(5)=96, a(6)=192, a(7)=384 (a(7)=284 was corrected)).
- Kenji Ohkuma, Atsuhiro Yamagishi and Toru Ito, Cryptography Research Group Technical report, IT Security Center, Information-Technology Promotion Agency, JAPAN.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- K. Bezdek and Tudor Zamfirescu, A Characterization of 3-dimensional Convex Sets with an Infinite X-ray Number, in: Coll. Math. Soc. J. Bolyai 63., Intuitive Geometry, Szeged (Hungary), North-Holland, Amsterdam, 1991, pp. 33-38.
- Allan Bickle, Properties of Sierpinski Triangle Graphs, Springer PROMS 448 (2021) 295-303.
- Yuri Brudnyi and Pavel Shvartsman, Generalizations of Whitney's extension theorem, International Mathematics Research Notices 1994.3 (1994): 129-139.
- J. W. Cannon and P. Wagreich, Growth functions of surface groups, Mathematische Annalen, 1992, Volume 293, pp. 239-257. See Prop. 3.1.
- Tomislav Došlić, Kepler-Bouwkamp Radius of Combinatorial Sequences, Journal of Integer Sequences, Vol. 17, 2014, #14.11.3.
- John Elias, Illustration: 2^n+1 hexagram perimeters
- Lukas Fleischer and Jeffrey Shallit, Words With Few Palindromes, Revisited, arxiv preprint arXiv:1911.12464 [cs.FL], November 27 2019.
- A. Hinz, S. Klavzar, and S. Zemljic, A survey and classification of Sierpinski-type graphs, Discrete Applied Mathematics 217 3 (2017), 565-600.
- Tanya Khovanova, Recursive Sequences
- Roberto Rinaldi and Marco Ripà, Optimal cycles enclosing all the nodes of a k-dimensional hypercube, arXiv:2212.11216 [math.CO], 2022.
- Edwin Soedarmadji, Latin Hypercubes and MDS Codes, Discrete Mathematics, Volume 306, Issue 12, Jun 28 2006, Pages 1232-1239
- D. Stephen, Topology on Finite Sets, American Mathematical Monthly, 75: 739 - 741, 1968.
- Index entries for linear recurrences with constant coefficients, signature (2).
Coordination sequences for triangular tilings of hyperbolic space:
A001630,
A007283,
A054886,
A078042,
A096231,
A163876,
A179070,
A265057,
A265058,
A265059,
A265060,
A265061,
A265062,
A265063,
A265064,
A265065,
A265066,
A265067,
A265068,
A265069,
A265070,
A265071,
A265072,
A265073,
A265074,
A265075,
A265076,
A265077.
Subsequence of the following sequences:
A029744,
A029747,
A029748,
A029750,
A362804 (after 3),
A364494,
A364496,
A364289,
A364291,
A364292,
A364295,
A364497,
A364964,
A365422.
Row sums of (5, 1)-Pascal triangle
A093562 and of (1, 5) Pascal triangle
A096940.
-
a007283 = (* 3) . (2 ^)
a007283_list = iterate (* 2) 3
-- Reinhard Zumkeller, Mar 18 2012, Feb 20 2012
-
[3*2^n: n in [0..30]]; // Vincenzo Librandi, May 18 2011
-
A007283:=n->3*2^n; seq(A007283(n), n=0..50); # Wesley Ivan Hurt, Dec 03 2013
-
Table[3(2^n), {n, 0, 32}] (* Alonso del Arte, Mar 24 2011 *)
-
A007283(n):=3*2^n$
makelist(A007283(n),n,0,30); /* Martin Ettl, Nov 11 2012 */
-
a(n)=3*2^n
-
a(n)=3<Charles R Greathouse IV, Oct 10 2012
-
def A007283(n): return 3<Chai Wah Wu, Feb 14 2023
-
(List.fill(40)(2: BigInt)).scanLeft(1: BigInt)( * ).map(3 * ) // _Alonso del Arte, Nov 28 2019
A048675
If n = p_i^e_i * ... * p_k^e_k, p_i < ... < p_k primes (with p_i = prime(i)), then a(n) = (1/2) * (e_i * 2^i + ... + e_k * 2^k).
Original entry on oeis.org
0, 1, 2, 2, 4, 3, 8, 3, 4, 5, 16, 4, 32, 9, 6, 4, 64, 5, 128, 6, 10, 17, 256, 5, 8, 33, 6, 10, 512, 7, 1024, 5, 18, 65, 12, 6, 2048, 129, 34, 7, 4096, 11, 8192, 18, 8, 257, 16384, 6, 16, 9, 66, 34, 32768, 7, 20, 11, 130, 513, 65536, 8, 131072, 1025, 12, 6, 36, 19
Offset: 1
From _Gus Wiseman_, May 22 2024: (Start)
The A018819(7) = 6 cases of binary rank 7 are the following, together with their prime indices:
30: {1,2,3}
40: {1,1,1,3}
54: {1,2,2,2}
72: {1,1,1,2,2}
96: {1,1,1,1,1,2}
128: {1,1,1,1,1,1,1}
(End)
Pairs of sequences (f,g) that satisfy a(f(n)) = g(n), possibly with offset change: (
A000203,
A331750), (
A005940,
A087808), (
A007913,
A248663), (
A007947,
A087207), (
A097248,
A048675), (
A206296,
A000129), (
A248692,
A056239), (
A283477,
A005187), (
A284003,
A006068), (
A285101,
A028362), (
A285102,
A068052), (
A293214,
A001065), (
A318834,
A051953), (
A319991,
A293897), (
A319992,
A293898), (
A320017,
A318674), (
A329352,
A069359), (
A332461,
A156552), (
A332462,
A156552), (
A332825,
A000010) and apparently (
A163511,
A135529).
The formula section details how the sequence maps the terms of
A329050,
A329332.
The term k appears
A018819(k) times.
The inverse transformation is
A019565 (Heinz number of binary indices).
The version for distinct prime indices is
A087207.
A014499 lists binary indices of prime numbers.
Binary indices:
-
nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc. - this is also A049084.
A048675 := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end;
# simpler alternative
f:= n -> add(2^(numtheory:-pi(t[1])-1)*t[2], t=ifactors(n)[2]):
map(f, [$1..100]); # Robert Israel, Oct 10 2016
-
a[1] = 0; a[n_] := Total[ #[[2]]*2^(PrimePi[#[[1]]]-1)& /@ FactorInteger[n] ]; Array[a, 100] (* Jean-François Alcover, Mar 15 2016 *)
-
a(n) = my(f = factor(n)); sum(k=1, #f~, f[k,2]*2^primepi(f[k,1]))/2; \\ Michel Marcus, Oct 10 2016
-
\\ The following program reconstructs terms (e.g. for checking purposes) from the factorization file prepared by Hans Havermann:
v048675sigs = readvec("a048675.txt");
A048675(n) = if(n<=2,n-1,my(prsig=v048675sigs[n],ps=prsig[1],es=prsig[2]); prod(i=1,#ps,ps[i]^es[i])); \\ Antti Karttunen, Feb 02 2020
-
from sympy import factorint, primepi
def a(n):
if n==1: return 0
f=factorint(n)
return sum([f[i]*2**(primepi(i) - 1) for i in f])
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 19 2017
A248663
Binary encoding of the prime factors of the squarefree part of n.
Original entry on oeis.org
0, 1, 2, 0, 4, 3, 8, 1, 0, 5, 16, 2, 32, 9, 6, 0, 64, 1, 128, 4, 10, 17, 256, 3, 0, 33, 2, 8, 512, 7, 1024, 1, 18, 65, 12, 0, 2048, 129, 34, 5, 4096, 11, 8192, 16, 4, 257, 16384, 2, 0, 1, 66, 32, 32768, 3, 20, 9, 130, 513, 65536, 6, 131072, 1025, 8, 0, 36, 19
Offset: 1
a(3500) = a(2^2 * 5^3 * 7) = a(2) XOR a(2) XOR a(5) XOR a(5) XOR a(5) XOR a(7) = 1 XOR 1 XOR 4 XOR 4 XOR 4 XOR 8 = 0b0100 XOR 0b1000 = 0b1100 = 12.
From _Peter Munn_, Jun 07 2021: (Start)
The examples in the table below illustrate the homomorphisms (between polynomial structures) represented by this sequence.
The staggering of the rows is to show how the mapping n -> A007913(n) -> A048675(A007913(n)) = a(n) relates to the encoded polynomials, as not all encodings are relevant at each stage.
For an explanation of each polynomial encoding, see the sequence referenced in the relevant column heading. (Note also that A007913 generates squarefree numbers, and with these encodings, all squarefree numbers represent equivalent polynomials in N[x] and GF(2)[x,y].)
|<----- encoded polynomials ----->|
n A007913(n) a(n) | N[x] GF(2)[x,y] GF(2)[x]|
|Cf.: A206284 A329329 A048720|
--------------------------------------------------------------
24 x+3 x+y+1
6 x+1 x+1
3 x+1
--------------------------------------------------------------
36 2x+2 xy+y
1 0 0
0 0
--------------------------------------------------------------
60 x^2+x+2 x^2+x+y
15 x^2+x x^2+x
6 x^2+x
--------------------------------------------------------------
90 x^2+2x+1 x^2+xy+1
10 x^2+1 x^2+1
5 x^2+1
--------------------------------------------------------------
This sequence is a left inverse of A019565. A019565(.) maps a(n) to A007913(n) for all n, effectively reversing the second stage of the mapping from n to a(n) shown above. So, with the encodings used here, A019565(.) represents each of two injective homomorphisms that map polynomials in GF(2)[x] to equivalent polynomials in N[x] and GF(2)[x,y] respectively.
(End)
A087207 is the analogous sequence with OR.
A000290 gives the positions of zeros.
-
import Data.Bits (xor)
a248663 = foldr (xor) 0 . map (\i -> 2^(i - 1)) . a112798_row
-- Peter Kagey, Sep 16 2016
-
f:= proc(n)
local F,f;
F:= select(t -> t[2]::odd, ifactors(n)[2]);
add(2^(numtheory:-pi(f[1])-1), f = F)
end proc:
seq(f(i),i=1..100); # Robert Israel, Jan 12 2015
-
a[1] = 0; a[n_] := a[n] = If[PrimeQ@ n, 2^(PrimePi@ n - 1), BitXor[a[#], a[n/#]] &@ FactorInteger[n][[1, 1]]]; Array[a, 66] (* Michael De Vlieger, Sep 16 2016 *)
-
A248663(n) = vecsum(apply(p -> 2^(primepi(p)-1),factor(core(n))[,1])); \\ Antti Karttunen, Feb 15 2021
-
from sympy import factorint, primepi
from sympy.ntheory.factor_ import core
def a048675(n):
f=factorint(n)
return 0 if n==1 else sum([f[i]*2**(primepi(i) - 1) for i in f])
def a(n): return a048675(core(n))
print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 21 2017
-
require 'prime'
def f(n)
a = 0
reverse_primes = Prime.each(n).to_a.reverse
reverse_primes.each do |prime|
a <<= 1
while n % prime == 0
n /= prime
a ^= 1
end
end
a
end
(Scheme, with memoizing-macro definec)
(definec (A248663 n) (cond ((= 1 n) 0) ((= 1 (A010051 n)) (A000079 (- (A000720 n) 1))) (else (A003987bi (A248663 (A020639 n)) (A248663 (A032742 n)))))) ;; Where A003987bi computes bitwise-XOR as in A003987.
;; Alternatively:
(definec (A248663 n) (cond ((= 1 n) 0) (else (A003987bi (A000079 (- (A055396 n) 1)) (A248663 (A032742 n))))))
;; Antti Karttunen, Dec 11 2015
A329631
Irregular triangle read by rows where row n lists the prime indices of the n-th squarefree number.
Original entry on oeis.org
1, 2, 3, 1, 2, 4, 1, 3, 5, 6, 1, 4, 2, 3, 7, 8, 2, 4, 1, 5, 9, 1, 6, 10, 1, 2, 3, 11, 2, 5, 1, 7, 3, 4, 12, 1, 8, 2, 6, 13, 1, 2, 4, 14, 1, 9, 15, 2, 7, 16, 3, 5, 2, 8, 1, 10, 17, 18, 1, 11, 3, 6, 1, 2, 5, 19, 2, 9, 1, 3, 4, 20, 21, 1, 12, 4, 5, 1, 2, 6
Offset: 1
Triangle begins:
1: {} 33: {2,5} 66: {1,2,5} 97: {25}
2: {1} 34: {1,7} 67: {19} 101: {26}
3: {2} 35: {3,4} 69: {2,9} 102: {1,2,7}
5: {3} 37: {12} 70: {1,3,4} 103: {27}
6: {1,2} 38: {1,8} 71: {20} 105: {2,3,4}
7: {4} 39: {2,6} 73: {21} 106: {1,16}
10: {1,3} 41: {13} 74: {1,12} 107: {28}
11: {5} 42: {1,2,4} 77: {4,5} 109: {29}
13: {6} 43: {14} 78: {1,2,6} 110: {1,3,5}
14: {1,4} 46: {1,9} 79: {22} 111: {2,12}
15: {2,3} 47: {15} 82: {1,13} 113: {30}
17: {7} 51: {2,7} 83: {23} 114: {1,2,8}
19: {8} 53: {16} 85: {3,7} 115: {3,9}
21: {2,4} 55: {3,5} 86: {1,14} 118: {1,17}
22: {1,5} 57: {2,8} 87: {2,10} 119: {4,7}
23: {9} 58: {1,10} 89: {24} 122: {1,18}
26: {1,6} 59: {17} 91: {4,6} 123: {2,13}
29: {10} 61: {18} 93: {2,11} 127: {31}
30: {1,2,3} 62: {1,11} 94: {1,15} 129: {2,14}
31: {11} 65: {3,6} 95: {3,8} 130: {1,3,6}
Same as
A319247 with rows reversed.
Looking at all numbers instead of just squarefree numbers gives
A112798.
-
Table[PrimePi/@First/@If[k==1,{},FactorInteger[k]],{k,Select[Range[30],SquareFreeQ]}]
A339360
Sum of all squarefree numbers with greatest prime factor prime(n).
Original entry on oeis.org
1, 2, 9, 60, 504, 6336, 89856, 1645056, 33094656, 801239040, 24246190080, 777550233600, 29697402470400, 1250501433753600, 55083063155097600, 2649111037319577600, 143390180403000115200, 8619643674791667302400, 534710099148093259776000, 36412881178052121329664000
Offset: 0
The initial terms are:
1 = 1,
2 = 2,
9 = 3 + 6,
60 = 5 + 10 + 15 + 30.
A010036 takes prime indices here to binary indices, row sums of
A209862.
A048672 takes prime indices to binary indices in squarefree numbers.
A072047 counts prime factors of squarefree numbers.
A006881 lists squarefree semiprimes.
A056239 is the sum of prime indices of n (Heinz weight).
A319246 is the sum of prime indices of the n-th squarefree number.
A319247 lists reversed prime indices of squarefree numbers.
A329631 lists prime indices of squarefree numbers.
-
f:= proc(n) local i;
`if`(n=0, 1, ithprime(n)) *mul(1+ithprime(i),i=1..n-1)
end proc:
map(f, [$0..20]); # Robert Israel, Dec 08 2020
-
Table[Sum[Times@@Prime/@stn,{stn,Select[Subsets[Range[n]],MemberQ[#,n]&]}],{n,10}]
A048623
Binary encoding of semiprimes (A001358).
Original entry on oeis.org
2, 3, 4, 5, 9, 6, 10, 17, 8, 33, 18, 65, 12, 129, 34, 257, 16, 66, 20, 130, 513, 1025, 36, 258, 2049, 24, 4097, 68, 8193, 514, 40, 1026, 16385, 132, 32769, 2050, 260, 65537, 72, 32, 131073, 4098, 8194, 136, 262145, 16386, 524289, 48, 516, 1048577, 1028
Offset: 1
Squares p_i^2 are encoded with a single bit in position i (e.g. 25=ithprime(3)*ithprime(3) => 2^3 = 8) and other terms p_i*p_j are encoded with two bits, as sum 2^(i-1)+2^(j-1)
-
nthprime := proc(n) local i; if(isprime(n)) then for i from 1 to 1000000 do if(ithprime(i) = n) then RETURN(i); fi; od; else RETURN(0); fi; end; # nthprime(2) = 1, nthprime(3) = 2, nthprime(5) = 3, etc.
bef := proc(n) local s,d; s := 0; for d in ifactors(n)[ 2 ] do s := s + d[ 2 ]*(2^(nthprime(d[ 1 ])-1)); od; RETURN(s); end; # bef = Binary Encode Factorization.
encode_semiprimes := proc(upto_n) local b,i; b := [ ]; for i from 1 to upto_n do if((3 = tau(i)) or ((0 <> mobius(i)) and (4 = tau(i)))) then b := [ op(b), bef(i) ]; fi; od: RETURN(b); end;
-
f[n_] := Block[{p = FactorInteger@ n}, Total[2^PrimePi@ # &@ Map[First, p - If[Length@ p == 2, 1, 0]]]]; f /@ Select[Range@ 156, PrimeOmega@ # == 2 &] (* Michael De Vlieger, Oct 01 2015 *)
-
lista(nn) = {for (n=1, nn, if (bigomega(n)==2, if (issquare(n), x = 2^primepi(sqrtint(n)), f = factor(n); x = sum(k=1, #f~, 2^(primepi(f[k,1]) - 1))); print1(x, ", ");););} \\ Michel Marcus, Oct 02 2015
-
from math import isqrt
from sympy import primepi, primerange, factorint
def A048623(n):
def f(x): return int(n+x+((t:=primepi(s:=isqrt(x)))*(t-1)>>1)-sum(primepi(x//p) for p in primerange(s+1)))
m, k = n, f(n)
while m != k: m, k = k, f(k)
return sum(e<Chai Wah Wu, Feb 22 2025
A329558
Product of primes indexed by the first n squarefree numbers.
Original entry on oeis.org
1, 2, 6, 30, 330, 4290, 72930, 2114970, 65564070, 2688126870, 115589455410, 5432704404270, 320529559851930, 21475480510079310, 1567710077235789630, 123849096101627380770, 10279474976435072603910, 1038226972619942332994910, 113166740015573714296445190, 12787841621759829715498306470
Offset: 0
The sequence of terms together with their corresponding systems begins:
1: {}
2: {{}}
6: {{},{1}}
30: {{},{1},{2}}
330: {{},{1},{2},{3}}
4290: {{},{1},{2},{3},{1,2}}
72930: {{},{1},{2},{3},{1,2},{4}}
2114970: {{},{1},{2},{3},{1,2},{4},{1,3}}
The smallest BII-number of a set of n sets is
A000225(n).
MM-numbers of sets of sets are
A302494.
The case without empty edges is
A329557.
The case without singletons is
A329556.
The case without empty edges or singletons is
A329554.
-
sqvs=Select[Range[30],SquareFreeQ];
Table[Times@@Prime/@Take[sqvs,k],{k,0,Length[sqvs]}]
A064273
Permutation of nonnegative integers: a(n) = A013928(A019565(n)).
Original entry on oeis.org
0, 1, 2, 4, 3, 6, 10, 18, 5, 9, 13, 27, 22, 43, 64, 128, 7, 14, 20, 40, 33, 68, 100, 202, 47, 93, 143, 282, 232, 469, 702, 1404, 8, 16, 25, 48, 39, 79, 119, 235, 56, 110, 167, 333, 278, 553, 832, 1660, 88, 175, 260, 520, 437, 872, 1303, 2609, 608, 1216, 1826, 3649
Offset: 0
-
allocatemem(234567890);
default(primelimit, 2^22)
uplim_for_13928 = 13123111;
v013928 = vector(uplim_for_13928); A013928(n) = v013928[n];
v013928[1]=0; n=1; while((n < uplim_for_13928), if(issquarefree(n), v013928[n+1] = v013928[n]+1, v013928[n+1] = v013928[n]); n++);
A019565(n) = {factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ M. F. Hasler
A064273(n) = A013928(A019565(n));
for(n=0, 478, write("b064273.txt", n, " ", A064273(n))); \\ Antti Karttunen, Aug 23 2014
-
from math import prod, isqrt
from sympy import prime, mobius
def A064273(n):
m = prod(prime(i) for i,j in enumerate(bin(n)[-1:1:-1],1) if j=='1')
return int(sum(mobius(k)*(m//k**2) for k in range(1, isqrt(m)+1))-1) # Chai Wah Wu, Feb 23 2025
-
(define (A064273 n) (let loop ((n n) (i 1) (p 1)) (cond ((zero? n) (- (A013928 (+ 1 p)) 1)) ((odd? n) (loop (/ (- n 1) 2) (+ 1 i) (* p (A000040 i)))) (else (loop (/ n 2) (+ 1 i) p))))) ;; Antti Karttunen, Aug 23 2014
A243290
The index of the greatest prime dividing the n-th squarefree number: a(n) = A061395(A005117(n)).
Original entry on oeis.org
0, 1, 2, 3, 2, 4, 3, 5, 6, 4, 3, 7, 8, 4, 5, 9, 6, 10, 3, 11, 5, 7, 4, 12, 8, 6, 13, 4, 14, 9, 15, 7, 16, 5, 8, 10, 17, 18, 11, 6, 5, 19, 9, 4, 20, 21, 12, 5, 6, 22, 13, 23, 7, 14, 10, 24, 6, 11, 15, 8, 25, 26, 7, 27, 4, 16, 28, 29, 5, 12
Offset: 1
-
Table[PrimePi[FactorInteger[k][[-1, 1]]], {k, Select[Range[120], SquareFreeQ]}] (* Amiram Eldar, Mar 04 2024 *)
Showing 1-10 of 17 results.
Comments