cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Previous Showing 11-20 of 106 results. Next

A006093 a(n) = prime(n) - 1.

Original entry on oeis.org

1, 2, 4, 6, 10, 12, 16, 18, 22, 28, 30, 36, 40, 42, 46, 52, 58, 60, 66, 70, 72, 78, 82, 88, 96, 100, 102, 106, 108, 112, 126, 130, 136, 138, 148, 150, 156, 162, 166, 172, 178, 180, 190, 192, 196, 198, 210, 222, 226, 228, 232, 238, 240, 250, 256, 262, 268, 270
Offset: 1

Views

Author

Keywords

Comments

These are also the numbers that cannot be written as i*j + i + j (i,j >= 1). - Rainer Rosenthal, Jun 24 2001; Henry Bottomley, Jul 06 2002
The values of k for which Sum_{j=0..n} (-1)^j*binomial(k, j)*binomial(k-1-j, n-j)/(j+1) produces an integer for all n such that n < k. Setting k=10 yields [0, 1, 4, 11, 19, 23, 19, 11, 4, 1, 0] for n = [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9], so 10 is in the sequence. Setting k=3 yields [0, 1, 1/2, 1/2] for n = [-1, 0, 1, 2], so 3 is not in the sequence. - Dug Eichelberger (dug(AT)mit.edu), May 14 2001
n such that x^n + x^(n-1) + x^(n-2) + ... + x + 1 is irreducible. - Robert G. Wilson v, Jun 22 2002
Records for Euler totient function phi.
Together with 0, n such that (n+1) divides (n!+1). - Benoit Cloitre, Aug 20 2002; corrected by Charles R Greathouse IV, Apr 20 2010
n such that phi(n^2) = phi(n^2 + n). - Jon Perry, Feb 19 2004
Numbers having only the trivial perfect partition consisting of a(n) 1's. - Lekraj Beedassy, Jul 23 2006
Numbers n such that the sequence {binomial coefficient C(k,n), k >= n } contains exactly one prime. - Artur Jasinski, Dec 02 2007
Record values of A143201: a(n) = A143201(A001747(n+1)) for n > 1. - Reinhard Zumkeller, Aug 12 2008
From Reinhard Zumkeller, Jul 10 2009: (Start)
The first N terms can be generated by the following sieving process:
start with {1, 2, 3, 4, ..., N - 1, N};
for i := 1 until SQRT(N) do
(if (i is not striked out) then
(for j := 2 * i + 1 step i + 1 until N do
(strike j from the list)));
remaining numbers = {a(n): a(n) <= N}. (End)
a(n) = partial sums of A075526(n-1) = Sum_{1..n} A075526(n-1) = Sum_{1..n} (A008578(n+1) - A008578(n)) = Sum_{1..n} (A158611(n+2) - A158611(n+1)) for n >= 1. - Jaroslav Krizek, Aug 04 2009
A171400(a(n)) = 1 for n <> 2: subsequence of A171401, except for a(2) = 2. - Reinhard Zumkeller, Dec 08 2009
Numerator of (1 - 1/prime(n)). - Juri-Stepan Gerasimov, Jun 05 2010
Numbers n such that A002322(n+1) = n. This statement is stronger than repeating the property of the entries in A002322, because it also says in reciprocity that this sequence here contains no numbers beyond the Carmichael numbers with that property. - Michel Lagneau, Dec 12 2010
a(n) = A192134(A095874(A000040(n))); subsequence of A192133. - Reinhard Zumkeller, Jun 26 2011
prime(a(n)) + prime(k) < prime(a(k) + k) for at least one k <= a(n): A212210(a(n),k) < 0. - Reinhard Zumkeller, May 05 2012
Except for the first term, numbers n such that the sum of first n natural numbers does not divide the product of first n natural numbers; that is, n*(n + 1)/2 does not divide n!. - Jayanta Basu, Apr 24 2013
BigOmega(a(n)) equals BigOmega(a(n)*(a(n) + 1)/2), where BigOmega = A001222. Rationale: BigOmega of the product on the right hand side factorizes as BigOmega(a/2) + Bigomega(a+1) = BigOmega(a/2) + 1 because a/2 and a + 1 are coprime, because BigOmega is additive, and because a + 1 is prime. Furthermore Bigomega(a/2) = Bigomega(a) - 1 because essentially all 'a' are even. - Irina Gerasimova, Jun 06 2013
Record values of A060681. - Omar E. Pol, Oct 26 2013
Deficiency of n-th prime. - Omar E. Pol, Jan 30 2014
Conjecture: All the sums Sum_{k=s..t} 1/a(k) with 1 <= s <= t are pairwise distinct. In general, for any integers d >= -1 and m > 0, if Sum_{k=i..j} 1/(prime(k)+d)^m = Sum_{k=s..t} 1/(prime(k)+d)^m with 0 < i <= j and 0 < s <= t then we must have (i,j) = (s,t), unless d = m = 1 and {(i,j),(s,t)} = {(4,4),(8,10)} or {(4,7),(5,10)}. (Note that 1/(prime(8)+1)+1/(prime(9)+1)+1/(prime(10)+1) = 1/(prime(4)+1) and Sum_{k=5..10} 1/(prime(k)+1) = 1/(prime(4)+1) + Sum_{k=5..7} 1/(prime(k)+1).) - Zhi-Wei Sun, Sep 09 2015
Numbers n such that (prime(i)^n + n) is divisible by (n+1), for all i >= 1, except when prime(i) = n+1. - Richard R. Forberg, Aug 11 2016
a(n) is the period of Fubini numbers (A000670) over the n-th prime. - Federico Provvedi, Nov 28 2020

References

  • Archimedeans Problems Drive, Eureka, 40 (1979), 28.
  • Harvey Dubner, Generalized Fermat primes, J. Recreational Math., 18 (1985): 279-280.
  • M. Gardner, The Colossal Book of Mathematics, pp. 31, W. W. Norton & Co., NY, 2001.
  • M. Gardner, Mathematical Circus, pp. 251-2, Alfred A. Knopf, NY, 1979.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = K(n, 1) and A034693(K(n, 1)) = 1 for all n. The subscript n refers to this sequence and K(n, 1) is the index in A034693. - Labos Elemer
Cf. A000040, A034694. Different from A075728.
Complement of A072668 (composite numbers minus 1), A072670(a(n))=0.
Essentially the same as A039915.
Cf. A101301 (partial sums), A005867 (partial products).
Column 1 of the following arrays/triangles: A087738, A249741, A352707, A378979, A379010.
The last diagonal of A162619, and of A174996, the first diagonal in A131424.
Row lengths of irregular triangles A086145, A124223, A212157.

Programs

Formula

a(n) = (p-1)! mod p where p is the n-th prime, by Wilson's theorem. - Jonathan Sondow, Jul 13 2010
a(n) = A000010(prime(n)) = A000010(A006005(n)). - Antti Karttunen, Dec 16 2012
a(n) = A005867(n+1)/A005867(n). - Eric Desbiaux, May 07 2013
a(n) = A000040(n) - 1. - Omar E. Pol, Oct 26 2013
a(n) = A033879(A000040(n)). - Omar E. Pol, Jan 30 2014

Extensions

Correction for change of offset in A158611 and A008578 in Aug 2009 Jaroslav Krizek, Jan 27 2010
Obfuscating comments removed by Joerg Arndt, Mar 11 2010
Edited by Charles R Greathouse IV, Apr 20 2010

A055932 Numbers all of whose prime divisors are consecutive primes starting at 2.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 18, 24, 30, 32, 36, 48, 54, 60, 64, 72, 90, 96, 108, 120, 128, 144, 150, 162, 180, 192, 210, 216, 240, 256, 270, 288, 300, 324, 360, 384, 420, 432, 450, 480, 486, 512, 540, 576, 600, 630, 648, 720, 750, 768, 810, 840, 864, 900, 960, 972
Offset: 1

Views

Author

Leroy Quet, Jul 17 2000

Keywords

Comments

a(n) is also the sorted version of A057335 which is generated recursively using the formula A057335 = A057334 * A057335(repeated), where A057334 = A000040(A000120). - Alford Arnold, Nov 11 2001
Squarefree kernels of these numbers are primorial numbers. See A080404. - Labos Elemer, Mar 19 2003
If u and v are terms then so is u*v. - Reinhard Zumkeller, Nov 24 2004
Except for the initial value a(1) = 1, a(n) gives the canonical primal code of the n-th finite sequence of positive integers, where n = (prime_1)^c_1 * ... * (prime_k)^c_k is the code for the finite sequence c_1, ..., c_k. See examples of primal codes at A106177. - Jon Awbrey, Jun 22 2005
From Daniel Forgues, Jan 24 2011: (Start)
Least integer, in increasing order, of each ordered prime signature.
The least integer of each ordered prime signature are the smallest numbers with a given tuple of exponents of prime factors.
The ordered prime signature (where the order of exponents matters) of n corresponds to a given composition of Omega(n), as opposed to the prime signature of n, which corresponds to a given partition of Omega(n). (End)
Except for the initial entry 1, the entries of the sequence are the Heinz numbers of all partitions that contain all parts 1,2,...,k, where k is the largest part. The Heinz number of a partition p = [p_1, p_2, ..., p_r] is defined as Product(p_j-th prime, j=1...r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1,1,2,4,10] the Heinz number is 2*2*3*7*29 = 2436. The number 150 (= 2*3*5*5) is in the sequence because it is the Heinz number of the partition [1,2,3,3]. - Emeric Deutsch, May 22 2015
Numbers n such that A053669(n) > A006530(n). - Anthony Browne, Jun 06 2016
From David W. Wilson, Dec 28 2018: (Start)
Numbers n such that for primes p > q, p | n => q | n.
Numbers n such that prime p | n => A034386(p) | n. (End)

Examples

			60 is included because 60 = 2^2 * 3 * 5 and 2, 3 and 5 are consecutive primes beginning at 2.
Sequence A057335 begins
1..2..4..6..8..12..18..30..16..24..36..60..54..90..150..210... which is equal to
1..2..2..3..2...3...3...5...2...3...3...5...3...5....5....7... times
1..1..2..2..4...4...6...6...8...8..12..12..18..18...30...30...
		

Crossrefs

Programs

  • Magma
    [1] cat [k:k in[2..1000 by 2]|forall{i:i in [1..#PrimeDivisors(k)-1]|NextPrime(pd[i]) in pd where pd is PrimeDivisors(k)}]; // Marius A. Burtea, Feb 01 2020
    
  • Maple
    isA055932 := proc(n)
        local s,p ;
        s := numtheory[factorset](n) ;
        for p in s do
            if p > 2 and not prevprime(p)  in s then
                return false;
            end if;
        end do:
        true ;
    end proc:
    for n from 2 to 100 do
        if isA055932(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Oct 02 2012
  • Mathematica
    Select[Range[1000], #==1||FactorInteger[ # ][[ -1, 1]]==Prime[Length[FactorInteger[ # ]]]&]
    cpQ[n_]:=Module[{f=Transpose[FactorInteger[n]][[1]]},f=={1}||f==Prime[ Range[Length[f]]]]; Select[Range[1000],cpQ] (* Harvey P. Dale, Jul 14 2012 *)
  • PARI
    is(n)=my(f=factor(n)[,1]~);f==primes(#f) \\ Charles R Greathouse IV, Aug 22 2011
    
  • PARI
    list(lim,p=2)=my(v=[1],q=nextprime(p+1),t=1);while((t*=p)<=lim,v=concat(v,t*list(lim\t,q))); vecsort(v) \\ Charles R Greathouse IV, Oct 02 2012
    
  • Python
    from itertools import count, islice
    from sympy import primepi, primefactors
    def A055932_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            p = list(map(primepi,primefactors(k)))
            if k==1 or (min(p)==1 and max(p)==len(p)):
                yield k
    A055932_list = list(islice(A055932_gen(),40)) # Chai Wah Wu, Aug 07 2025

Formula

Sum_{n>=1} 1/a(n) = Sum_{n>=0} 1/A005867(n) = 2.648101... (A345974). - Amiram Eldar, Jun 26 2025

Extensions

Edited by Daniel Forgues, Jan 24 2011

A032742 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).

Original entry on oeis.org

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

Views

Author

Patrick De Geest, May 15 1998

Keywords

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

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).

Programs

  • Haskell
    a032742 n = n `div` a020639 n  -- Reinhard Zumkeller, Oct 03 2012
    
  • 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 *)
  • PARI
    a(n)=if(n==1,1,n/factor(n)[1,1]) \\ Charles R Greathouse IV, Jun 15 2011
    
  • 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
  • Scheme
    (define (A032742 n) (/ n (A020639 n))) ;; Antti Karttunen, Dec 18 2014
    

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

Extensions

Definition clarified by N. J. A. Sloane, Dec 26 2022

A028234 If n = p_1^e_1 * ... * p_k^e_k, p_1 < ... < p_k primes, then a(n) = n/p_1^e_1, with a(1) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 1, 1, 5, 1, 3, 1, 7, 5, 1, 1, 9, 1, 5, 7, 11, 1, 3, 1, 13, 1, 7, 1, 15, 1, 1, 11, 17, 7, 9, 1, 19, 13, 5, 1, 21, 1, 11, 5, 23, 1, 3, 1, 25, 17, 13, 1, 27, 11, 7, 19, 29, 1, 15, 1, 31, 7, 1, 13, 33, 1, 17, 23, 35, 1, 9, 1, 37, 25, 19, 11, 39, 1, 5, 1, 41, 1, 21
Offset: 1

Views

Author

Keywords

Comments

Together with A067029 is useful for defining sequences that are multiplicative with a(p^e) = f(e), as recurrences of the form: a(1) = 1 and for n > 1, a(n) = f(A067029(n)) * a(A028234(n)). - Antti Karttunen, May 29 2017

Crossrefs

Programs

  • GAP
    a := List(List(List(List([1..10^3], Factors), Collected), i -> i[1]), j -> j[1]^j[2]);;
    A028234 := List([1..Length(a)],i->i/a[i]); # Muniru A Asiru, Jan 27 2018
  • Haskell
    a028234 n = n `div` a028233 n  -- Reinhard Zumkeller, Mar 27 2013
    
  • Mathematica
    a[n_] := n / Power @@ First[FactorInteger[n]]; Table[a[n], {n, 1, 84}] (* Jean-François Alcover, Jun 12 2012 *)
  • PARI
    a(n) = {my(f = factor(n)); if (#f~, f[1, 1] = 1); factorback(f);} \\ Michel Marcus, Feb 11 2016
    
  • Python
    from sympy import factorint
    def a(n):
        f = factorint(n)
        return 1 if n==1 else n/(min(f)**f[min(f)]) # Indranil Ghosh, May 12 2017
    
  • Scheme
    (define (A028234 n) (/ n (A028233 n))) ;; Needs also code from A020639 and A028233. - Antti Karttunen, May 29 2017
    

Formula

a(n) = n / A028233(n).
A001221(a(n)) = A001221(n)-1; A001222(a(n)) = A001222(n)-A067029(n). - Reinhard Zumkeller, May 13 2006
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Sum_{k>=0} A005867(k)/(prime(k+1)*(prime(k+1)+1)*A002110(k)) = 0.114813... . - Amiram Eldar, Nov 19 2022

Extensions

Edited name to include a(1) = 1 by Franklin T. Adams-Watters, Jan 27 2018

A006862 Euclid numbers: 1 + product of the first n primes.

Original entry on oeis.org

2, 3, 7, 31, 211, 2311, 30031, 510511, 9699691, 223092871, 6469693231, 200560490131, 7420738134811, 304250263527211, 13082761331670031, 614889782588491411, 32589158477190044731, 1922760350154212639071, 117288381359406970983271, 7858321551080267055879091
Offset: 0

Views

Author

Keywords

Comments

It is an open question whether all terms of this sequence are squarefree.
a(n) is the smallest x > 1 such that x^prime(n) == 1 (mod prime(i)) i=1,2,3,...,n-1. - Benoit Cloitre, May 30 2002
Numbers n such that n/phi(n-1) is a record. - Arkadiusz Wesolowski, Nov 22 2012
Nyblom (theorem 2.3) proves that this sequence contains no proper powers, e.g., is a subsequence of A007916. - Charles R Greathouse IV, Mar 02 2016
It is an open question if there are an infinite number of prime Euclid numbers. - Mike Winkler, Feb 05 2017
These numbers are not pairwise relatively prime; the first example is gcd(a(7), a(17)) = 277. Also gcd(a(47), a(131)) = 1051, which is probably the second example (wrt. greater index which is here 131). It is easy to find other primes like 277 and 1051. - Jeppe Stig Nielsen, Mar 24 2017
Subsequence of A048103. Proof: For all primes p, when i >= A000720(p), neither p itself nor p^p divides a(i), but neither does p^p divide a(i) when i < A000720(p), as p^p > 1 + A034386(p). - Antti Karttunen, Nov 17 2024

Examples

			It is a universal convention that an empty product is 1 (just as an empty sum is 0), and since this sequence has offset 0, the first term is 1+1 = 2. - _N. J. A. Sloane_, Dec 02 2015
		

References

  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 134.
  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 211, p. 61, Ellipses, Paris 2008.
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • F. Smarandache, Properties of numbers, Arizona State University Special Collections, 1973.
  • I. Vardi, Computational Recreations in Mathematica, Addison-Wesley, 1991, sections 5.1 and 5.2.
  • S. Wagon, Mathematica in Action, Freeman, NY, 1991, p. 35.

Crossrefs

Cf. A005867, A007916, A014545, A018239 (primes in sequence), A034386, A057588, A377871.
Subsequence of A048103.

Programs

  • Magma
    [2] cat [&*PrimesUpTo(p)+1: p in PrimesUpTo(70)]; // Vincenzo Librandi, Dec 03 2015
    
  • Maple
    with(numtheory): A006862 := proc(n) local i; if n=0 then 2 else 1+product('ithprime(i)','i'=1..n); fi; end;
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 2,
          1+ithprime(n)*(a(n-1)-1))
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Feb 06 2021
  • Mathematica
    Table[Product[Prime[k], {k, 1, n}] + 1, {n, 1, 18}]
    1 + FoldList[Times, 1, Prime@ Range@ 19] (* Harvey P. Dale, Dec 02 2015 and modified by Robert G. Wilson v, Mar 25 2017 *)
  • PARI
    a(n)=my(v=primes(n)); prod(i=1,#v,v[i])+1 \\ Charles R Greathouse IV, Nov 20 2012
    
  • Python
    from sympy import primorial
    def A006862(n):
        if n == 0: return 2
        else: return 1 + primorial(n) # Karl-Heinz Hofmann, Aug 21 2024

Formula

a(n) = A002110(n) + 1.
For n >= 1, a(n) = A057588(n) + 2. - Antti Karttunen, Nov 17 2024

A255127 Ludic array: square array A(row,col), where row n lists the numbers removed at stage n in the sieve which produces Ludic numbers. Array is read by antidiagonals A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 15, 19, 7, 10, 21, 35, 31, 11, 12, 27, 49, 59, 55, 13, 14, 33, 65, 85, 103, 73, 17, 16, 39, 79, 113, 151, 133, 101, 23, 18, 45, 95, 137, 203, 197, 187, 145, 25, 20, 51, 109, 163, 251, 263, 281, 271, 167, 29, 22, 57, 125, 191, 299, 325, 367, 403, 311, 205, 37, 24, 63, 139, 217, 343, 385, 461, 523, 457, 371, 253, 41
Offset: 2

Views

Author

Antti Karttunen, Feb 22 2015

Keywords

Comments

The starting offset of the sequence giving the terms of square array is 2. However, we can tacitly assume that a(1) = 1 when the sequence is used as a permutation of natural numbers. However, term 1 itself is out of the array.
The choice of offset = 2 for the terms starting in rows >= 1 is motivated by the desire to have a permutation of the integers n -> a(n) with a(n) = A(A002260(n-1), A004736(n-1)) for n > 1 and a(1) := 1. However, since this sequence is declared as a "table", offset = 2 would mean that the first *row* (not element) has index 2. I think the sequence should have offset = 1 and the permutation of the integers would be n -> a(n-1) with a(0) := 1 (if a(1) = A(1,1) = 2). Or, the sequence could have offset 0, with an additional row 0 of length 1 with the only element a(0) = A(0,1) = 1, the permutation still being n -> a(n-1) if a(n=0, 1, 2, ...) = (1, 2, 4, ...). This would be in line with considering 1 as the first ludic number, and A(n, 1) = A003309(n+1) for n >= 0. - M. F. Hasler, Nov 12 2024

Examples

			The top left corner of the array:
   2,   4,   6,   8,  10,  12,   14,   16,   18,   20,   22,   24,   26
   3,   9,  15,  21,  27,  33,   39,   45,   51,   57,   63,   69,   75
   5,  19,  35,  49,  65,  79,   95,  109,  125,  139,  155,  169,  185
   7,  31,  59,  85, 113, 137,  163,  191,  217,  241,  269,  295,  323
  11,  55, 103, 151, 203, 251,  299,  343,  391,  443,  491,  539,  587
  13,  73, 133, 197, 263, 325,  385,  449,  511,  571,  641,  701,  761
  17, 101, 187, 281, 367, 461,  547,  629,  721,  809,  901,  989, 1079
  23, 145, 271, 403, 523, 655,  781,  911, 1037, 1157, 1289, 1417, 1543
  25, 167, 311, 457, 599, 745,  883, 1033, 1181, 1321, 1469, 1615, 1753
  29, 205, 371, 551, 719, 895, 1073, 1243, 1421, 1591, 1771, 1945, 2117
...
		

Crossrefs

Transpose: A255129.
Inverse: A255128. (When considered as a permutation of natural numbers with a(1) = 1).
Cf. A260738 (index of the row where n occurs), A260739 (of the column).
Main diagonal: A255410.
Column 1: A003309 (without the initial 1). Column 2: A254100.
Row 1: A005843, Row 2: A016945, Row 3: A255413, Row 4: A255414, Row 5: A255415, Row 6: A255416, Row 7: A255417, Row 8: A255418, Row 9: A255419.
A192607 gives all the numbers right of the leftmost column, and A192506 gives the composites among them.
Cf. A272565, A271419, A271420 and permutations A269379, A269380, A269384.
Cf. also related or derived arrays A260717, A257257, A257258 (first differences of rows), A276610 (of columns), A276580.
Analogous arrays for other sieves: A083221, A255551, A255543.
Cf. A376237 (ludic factorials), A377469 (ludic analog of A005867).

Programs

  • Mathematica
    rows = 12; cols = 12; t = Range[2, 3000]; r = {1}; n = 1; While[n <= rows, k = First[t]; AppendTo[r, k]; t0 = t; t = Drop[t, {1, -1, k}]; ro[n++] = Complement[t0, t][[1 ;; cols]]]; A = Array[ro, rows]; Table[ A[[n - k + 1, k]], {n, 1, rows}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 14 2016, after Ray Chandler *)
  • Python
    a255127 = lambda n: A255127(A002260(k-1), A004736(k-1))
    def A255127(n, k):
        A = A255127; R = A.rows
        while len(R) <= n or len(R[n]) < min(k, A.P[n]): A255127_extend(2*n)
        return R[n][(k-1) % A.P[n]] + (k-1)//A.P[n] * A.S[n]
    A=A255127; A.rows=[[1],[2],[3]]; A.P=[1]*3; A.S=[0,2,6]; A.limit=30
    def A255127_extend(rMax=9, A=A255127):
        A.limit *= 2; L = [x+5-x%2 for x in range(0, A.limit, 3)]
        for r in range(3, rMax):
            if len(A.P) == r:
                A.P += [ A.P[-1] * (A.rows[-1][0] - 1) ]  # A377469
                A.rows += [[]]; A.S += [ A.S[-1] * L[0] ] # ludic factorials
            if len(R := A.rows[r]) < A.P[r]: # append more terms to this row
                R += L[ L[0]*len(R) : A.S[r] : L[0] ]
            L = [x for i, x in enumerate(L) if i%L[0]] # M. F. Hasler, Nov 17 2024
  • Scheme
    (define (A255127 n) (if (<= n 1) n (A255127bi (A002260 (- n 1)) (A004736 (- n 1)))))
    (define (A255127bi row col) ((rowfun_n_for_A255127 row) col))
    ;; definec-macro memoizes its results:
    (definec (rowfun_n_for_A255127 n) (if (= 1 n) (lambda (n) (+ n n)) (let* ((rowfun_for_remaining (rowfun_n_for_remaining_numbers (- n 1))) (eka (rowfun_for_remaining 0))) (COMPOSE rowfun_for_remaining (lambda (n) (* eka (- n 1)))))))
    (definec (rowfun_n_for_remaining_numbers n) (if (= 1 n) (lambda (n) (+ n n 3)) (let* ((rowfun_for_prevrow (rowfun_n_for_remaining_numbers (- n 1))) (off (rowfun_for_prevrow 0))) (COMPOSE rowfun_for_prevrow (lambda (n) (+ 1 n (floor->exact (/ n (- off 1)))))))))
    

Formula

From M. F. Hasler, Nov 12 2024: (Start)
A(r, c) = A(r, c-P(r)) + S(r) = A(r, ((c-1) mod P(r)) + 1) + floor((c-1)/P(r))*S(r) with periods P = (1, 1, 2, 8, 48, 480, 5760, ...) = A377469, and shifts S = (2, 6, 30, 210, 2310, 30030, 510510) = A376237(2, 3, ...). For example:
A(1, c) = A(1, c-1) + 2 = 2 + (c-1)*2 = 2*c,
A(2, c) = A(2, c-1) + 6 = 3 + (c-1)*6 = 6*c - 3,
A(3, c) = A(3, c-2) + 30 = {5 if c is odd else 19} + floor((c-1)/2)*30 = 15*c - 11 + (c mod 2),
A(4, c) = A(4, c-8) + 210 = A(4, ((c-1) mod 8)+1) + floor((c-1)/8)*210, etc. (End)

A083140 Sieve of Eratosthenes arranged as an array and read by antidiagonals in the up direction; n-th row has property that smallest prime factor is prime(n).

Original entry on oeis.org

2, 3, 4, 5, 9, 6, 7, 25, 15, 8, 11, 49, 35, 21, 10, 13, 121, 77, 55, 27, 12, 17, 169, 143, 91, 65, 33, 14, 19, 289, 221, 187, 119, 85, 39, 16, 23, 361, 323, 247, 209, 133, 95, 45, 18, 29, 529, 437, 391, 299, 253, 161, 115, 51, 20, 31, 841, 667, 551, 493, 377, 319, 203, 125, 57, 22
Offset: 2

Views

Author

Yasutoshi Kohmoto, Jun 05 2003

Keywords

Comments

A permutation of natural numbers >= 2.
The proportion of integers in the n-th row of the array is given by A005867(n-1)/A002110(n) = A038110(n)/A038111(n). - Peter Kagey, Jun 03 2019, based on comments by Jamie Morken and discussion with Tom Hanlon.
The proportion of the integers after the n-th row of the array is given by A005867(n)/A002110(n). - Tom Hanlon, Jun 08 2019

Examples

			Array begins:
   2   4   6   8  10  12  14  16  18  20  22  24 .... (A005843 \ {0})
   3   9  15  21  27  33  39  45  51  57  63  69 .... (A016945)
   5  25  35  55  65  85  95 115 125 145 155 175 .... (A084967)
   7  49  77  91 119 133 161 203 217 259 287 301 .... (A084968)
  11 121 143 187 209 253 319 341 407 451 473 517 .... (A084969)
  13 169 221 247 299 377 403 481 533 559 611 689 .... (A084970)
		

Crossrefs

Cf. A083141 (main diagonal), A083221 (transpose), A004280, A038179, A084967, A084968, A084969, A084970, A084971.
Arrays of integers grouped into rows by various criteria:
by greatest prime factor: A125624,
by lowest prime factor: this sequence (upward antidiagonals), A083221 (downward antidiagonals),
by number of distinct prime factors: A125666,
by number of prime factors counted with multiplicity: A078840,
by prime signature: A095904,
by ordered prime signature: A096153,
by number of divisors: A119586,
by number of 1's in binary expansion: A066884 (upward), A067576 (downward),
by distance to next prime: A192179.

Programs

  • Mathematica
    a = Join[ {Table[2n, {n, 1, 12}]}, Table[ Take[ Prime[n]*Select[ Range[100], GCD[ Prime[n] #, Product[ Prime[i], {i, 1, n - 1}]] == 1 &], 12], {n, 2, 12}]]; Flatten[ Table[ a[[i, n - i]], {n, 2, 12}, {i, n - 1, 1, -1}]]
    (* second program: *)
    rows = 12; Clear[T]; Do[For[m = p = Prime[n]; k = 1, k <= rows, m += p, If[ FactorInteger[m][[1, 1]] == p, T[n, k++] = m]], {n, rows}]; Table[T[n - k + 1, k], {n, rows}, {k, n}] // Flatten (* Jean-François Alcover, Mar 08 2016 *)

Extensions

More terms from Hugo Pfoertner and Robert G. Wilson v, Jun 13 2003

A008364 11-rough numbers: not divisible by 2, 3, 5 or 7.

Original entry on oeis.org

1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209, 211, 221, 223, 227, 229, 233, 239, 241, 247
Offset: 1

Views

Author

Keywords

Comments

The first A005867(4) = 48 terms give the reduced residue system for the 4th primorial number 210 = A002110(4).
This sequence is closed under multiplication: any product of terms is also a term. - Labos Elemer, Feb 26 2003
Conjecture: these are numbers n such that (Sum_{k=1..n} k^4) mod n = 0 and (Sum_{k=1..n} k^6) mod n = 0. - Gary Detlefs, Dec 20 2011
From Peter Bala, May 03 2018: (Start)
The above conjecture is true. Let m be even and let the m-th Bernoulli number be written in reduced form as Bernoulli(m) = N(m)/D(m). Apply Ireland and Rosen, Proposition 15.2.2, to show the congruence D(m)*( Sum_{k = 1..n} k^m )/n = N(m) (mod n) holds for all n >= 1. It follows easily from this congruence that ( Sum_{k = 1..n} k^m )/n is integral iff n is coprime to D(m). Now Bernoulli(4) = -1/(2*3*5) and Bernoulli(6) = 1/(2*3*7) so the numbers n such that both (Sum_{k=1..n} k^4) mod n = 0 and (Sum_{k=1..n} k^6) mod n = 0 are exactly those numbers coprime to the primes 2, 3, 5 and 7, that is, the 11-rough numbers. (End)
Conjecture: these are numbers n such that (n^6 mod 210 = 1) or (n^6 mod 210 = 169). - Gary Detlefs, Dec 30 2011
The second Detlefs conjecture above is true and extremely easy to verify with some basic properties of congruences: take the terms of this sequence up to 209 and compute their sixth powers modulo 210: there should only be 1's and 169's there. Then take the complement of this sequence up to 210, where you will see no instances of 1 or 169. - Alonso del Arte, Jan 12 2014
It is well-known that the product of 7 consecutive integers is divisible by 7!. Conjecture: This sequence is exactly the set of positive values of r such that ( Product_{k = 0..6} n + k*r )/7! is an integer for all n. - Peter Bala, Nov 14 2015
From Ruediger Jehn, Nov 05 2020: (Start)
This conjecture is true. The first part of the proof deals with numbers not in A008364, i.e., numbers which are divisible by p (p either 2, 3, 5, 7). Let r = p*s and n = 1, then (Product_{k = 0..6} n + k*r) is not divisible by p, because none of the factors 1 + k*p*s are divisible by p. Hence dividing the product by 7! does not return an integer.
The second part deals with numbers in A008364. If r and q are coprime, then for any i < q there exists k < q with (k*r mod q) = i. From this, it also follows that for any n there exists k < q with ((n + k*r) mod q) = 0. But this means that Product_{k = 0..6} n + k*r is divisible by all numbers from 2 to 7 because there is always a factor that is divisible. We still have to show that the product is also divisible by 2 times 3 times 4 times 6. If the k_1 with ((n + k_1*r) mod 4) = 0 is even, then (n mod 2) = ((n + 2*r) mod 2) = ((n + 4*r) mod 2) = ((n + 6*r) mod 2) = 0. If this k_1 is odd, then ((n + r) mod 2) = ((n + 3*r) mod 2) = ((n + 5*r) mod 2) = 0. In both cases there are at least 2 other factors divisible by 2. If the k_2 with ((n + k_2*r) mod 6) = 0 is smaller than 4, then ((n + (k_2 + 3)*r) mod 3) = 0. Otherwise, ((n + (k_2 - 3)*r) mod 3) = 0. In both cases there is at least 1 other factor divisible by 3. And therefore Product_{k = 0..6} n + k*r is divisible by 7! for any n.
(End)

References

  • Diatomic sequence of 4th prime: A. de Polignac (1849), J. Dechamps (1907).
  • Dickson L. E., History of the Theory of Numbers, Vol. 1, p. 439, Chelsea, 1952.
  • K. Ireland and M. Rosen, A Classical Introduction to Modern Number Theory, Springer-Verlag, 1980.

Crossrefs

First differences give A049296. Cf. A002110, A048597.
For k-rough numbers with other values of k, see A000027, A005408, A007310, A007775, A008364, A008365, A008366, A166061, A166063. - Michael B. Porter, Oct 10 2009
Cf. A005867, A092695, A210679, A080672 (complement).

Programs

  • Haskell
    a008364 n = a008364_list !! (n-1)
    a008364_list = 1 : filter ((> 7) . a020639) [1..]
    -- Reinhard Zumkeller, Mar 26 2012
  • Maple
    for i from 1 to 500 do if gcd(i,210) = 1 then print(i); fi; od;
    t1:=[]; for i from 1 to 1000 do if gcd(i,210) = 1 then t1:=[op(t1),i]; fi; od: t1;
    S:= (j,n)-> sum(k^j,k=1..n): for n from 1 to 247 do if (S(4,n) mod n = 0) and (S(6,n) mod n = 0) then print(n) fi od; # Gary Detlefs, Dec 20 2011
  • Mathematica
    Select[ Range[ 300 ], GCD[ #1, 210 ] == 1 & ]
    Select[Range[250], Mod[#, 2]>0 && Mod[#, 3]>0 && Mod[#, 5]>0 && Mod[#, 7]>0 &] (* Vincenzo Librandi, Nov 16 2015 *)
    Cases[Range@1000, x_ /; NoneTrue[Array[Prime, 4], Divisible[x, #] &]] (* Mikk Heidemaa, Dec 07 2017 *)
    Select[Range[250],Union[Divisible[#,{2,3,5,7}]]=={False}&] (* Harvey P. Dale, Sep 24 2021 *)
  • PARI
    isA008364(n) = gcd(n,210)==1 \\ Michael B. Porter, Oct 10 2009
    

Formula

Starting with a(49) = 211, a(n) = a(n-48) + 210. - Zak Seidov, Apr 11 2011
a(n) = a(n-1) + a(n-48) - a(n-49). - Charles R Greathouse IV, Dec 21 2011
A020639(a(n)) > 7. - Reinhard Zumkeller, Mar 26 2012
G.f.: x*(x^48 + 10*x^47 + 2*x^46 + 4*x^45 + 2*x^44 + 4*x^43 + 6*x^42 + 2*x^41 + 6*x^40 + 4*x^39 + 2*x^38 + 4*x^37 + 6*x^36 + 6*x^35 + 2*x^34 + 6*x^33 + 4*x^32 + 2*x^31 + 6*x^30 + 4*x^29 + 6*x^28 + 8*x^27 + 4*x^26 + 2*x^25 + 4*x^24 + 2*x^23 + 4*x^22 + 8*x^21 + 6*x^20 + 4*x^19 + 6*x^18 + 2*x^17 + 4*x^16 + 6*x^15 + 2*x^14 + 6*x^13 + 6*x^12 + 4*x^11 + 2*x^10 + 4*x^9 + 6*x^8 + 2*x^7 + 6*x^6 + 4*x^5 + 2*x^4 + 4*x^3 + 2*x^2 + 10*x + 1) / (x^49 - x^48 - x + 1). - Colin Barker, Sep 27 2013
a(n) = 35*n/8 + O(1). - Charles R Greathouse IV, Sep 14 2015
A007775 INTERSECT A206547. - R. J. Mathar, Apr 10 2024

Extensions

New name from Charles R Greathouse IV, Dec 21 2011 based on comment from Michael B. Porter, Oct 10 2009

A038110 Numerator of frequency of integers with smallest divisor prime(n).

Original entry on oeis.org

1, 1, 1, 4, 8, 16, 192, 3072, 55296, 110592, 442368, 13271040, 477757440, 19110297600, 802632499200, 1605264998400, 6421059993600, 12842119987200, 770527199232000, 50854795149312000, 3559835660451840000
Offset: 1

Views

Author

Keywords

Comments

Numerator of Product_{k=1..n-1} (1 - 1/prime(k)). - Jonathan Sondow, Jan 31 2014
Equivalently, denominator of Product_{k=1..n-1} prime(k)/(prime(k)-1) (cf. A060753). - N. J. A. Sloane, Apr 17 2015
Sum_{n>=1} a(n)/A038111(n) = 1. - Bob Selcoe, Jan 09 2015
a(n)/A038111(n) = (1/prime(n))*Product_{k=1..n-1} (1 - 1/prime(k)) ~ e^(-c)/ (prime(n)*log(prime(n))), where c=0.577... is the Euler constant. - Vladimir Shevelev, Jan 10 2015

Examples

			a(10) = 110592 = ( 1*2*4*6*10*12*16*18*22 ) / ( 2*3*5*11 ).
		

Crossrefs

Programs

  • Maple
    N:= 100: # for a(1) to a(N)
    Q:= 1: p:= 1:
    for n from 1 to N do
      p:= nextprime(p);
      A[n]:= numer(Q);
      Q:= Q * (1 - 1/p);
    end:
    seq(A[n],n=1..N); # Robert Israel, Jul 14 2014
  • Mathematica
    Numerator@Table[ Product[ 1-1/Prime[ k ], {k, n-1} ]/Prime[ n ], {n, 64} ]
    (* Wouter Meeussen *)
    Numerator@Table[ Product[ 1 - 1/Prime[ k ], {k, n-1}], {n, 64} ]
    (* Jonathan Sondow, Jan 31 2014 *)
    Numerator@
    Table[EulerPhi[Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n] - 1}]]]/
    Exp[Sum[MangoldtLambda[m], {m, 1, Prime[n]}]], {n, 21}]
    (* Fred Daniel Kline, Jul 14 2014 *)
  • PARI
    a(n) = numerator(prod(k=1, n-1, (1 - 1/prime(k)))); \\ Michel Marcus, Aug 05 2019

Formula

a(n) = A005867(n-1) / A058250(n-1), where A058250(m) = gcd(A005867(m), A002110(m)). [Edited by Peter Munn, Jun 29 2025]
a(n)/A060753(n) = Product_{k=1..n-1} (1 - 1/prime(k)) ~ exp(-gamma)/log(n) as n->infinity (Mertens's 3rd theorem). - Jonathan Sondow, Jan 31 2014
a(n+1)/A038111(n+1) = a(n)/A038111(n) * (prime(n)-1)/prime(n+1). - Robert Israel, Jul 14 2014
a(n) = numerator of phi(e^(psi(p_n-1)))/e^(psi(p_n)), where psi(.) is the second Chebyshev function and phi(.) is Euler's totient function. - Fred Daniel Kline, Jul 17 2014

A054640 a(n) is the sum of the divisors of the n-th primorial: a(n) = A000203(A002110(n)).

Original entry on oeis.org

1, 3, 12, 72, 576, 6912, 96768, 1741824, 34836480, 836075520, 25082265600, 802632499200, 30500034969600, 1281001468723200, 56364064623820800, 2705475101943398400, 146095655504943513600, 8765739330296610816000, 543475838478389870592000, 36956357016530511200256000
Offset: 0

Views

Author

Labos Elemer, May 15 2000

Keywords

Crossrefs

Programs

  • Magma
    [1/2*&*[(1+NthPrime(k)): k in [0..n-1]]: n in [1..19]]; // Vincenzo Librandi, May 08 2017
    
  • Maple
    a:= n-> mul(1+ithprime(j), j=1..n): seq(a(n), n=0..20); # Zerinvary Lajos, Aug 24 2008
  • Mathematica
    Table[Product[1 + Prime[i], {i,n-1}], {n,100}] (* Geoffrey Critzer, Dec 01 2014 *)
  • PARI
    a(n)=prod(i=1,n,prime(i)+1) \\ Charles R Greathouse IV, Feb 13 2013
    
  • SageMath
    def A054640(n): return product(nth_prime(j)+1 for j in range(1,n+1))
    [A054640(n) for n in range(41)] # G. C. Greubel, Aug 05 2024

Formula

a(n+1) = a(n)*(prime(n) + 1) = a(n)*A028815(n) (quotient=n-th prime+1 starting with 2).
a(n) ~ (6/Pi^2) * exp(gamma) * A002110(n) * log(prime(n)) + O(A002110(n)) (Jakimczuk, 2017). - Amiram Eldar, Feb 17 2021
a(n) = a(n-1) * A008864(n). - Flávio V. Fernandes, Mar 20 2021
a(n) = A002110(n) + A074107(n), a(n) <= A070826(1+n) [= A002110(1+n)/2] < A051674(n). - Antti Karttunen, Nov 19 2024

Extensions

a(0)=1 prepended by Alois P. Heinz, Apr 01 2021
Previous Showing 11-20 of 106 results. Next