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.

Showing 1-10 of 47 results. Next

A083141 Main diagonal of array in A083140.

Original entry on oeis.org

2, 9, 35, 91, 209, 377, 629, 817, 1219, 1769, 2201, 2923, 3649, 4343, 5029, 5989, 7729, 8479, 10117, 11573, 12629, 14299, 16019, 17711, 21631, 23129, 24617, 26857, 28667, 30623, 35687, 38383, 42607, 44063, 50213, 52699, 56363, 60799, 63961, 68681
Offset: 1

Views

Author

Yasutoshi Kohmoto, Jun 05 2003

Keywords

Crossrefs

Cf. A083140.

Programs

  • Mathematica
    Table[ Prime[n]*Prime[2n - 2], {n, 2, 41}]
  • PARI
    vector(50, n, if (n==1, 2, prime(n)*prime(2*n-2))) \\ Michel Marcus, Dec 19 2014

Formula

a(n) = prime(n)*prime(2*n-2).

Extensions

Edited and extended by Robert G. Wilson v, Jun 11 2003

A084971 Determinant of the leading n X n submatrix of A083140.

Original entry on oeis.org

2, 6, -60, 1680, 0, 0, -261381120, 101807946240, 11565134380800, -5051536473984000, 1677391670412057600, -123625460444389263360, -78207720091833771479040, 16848446417200616007229440, -2300367963201102480473948160
Offset: 1

Views

Author

Robert G. Wilson v, Jun 15 2003

Keywords

Crossrefs

Cf. A083140.

Programs

  • Mathematica
    d[n_] := Block[{k = n}, Det[ Join[ {Table[2i, {i, 1, k}]}, Table[ Take[ Prime[j]*Select[ Range[1000], GCD[ Prime[k] #, Product[ Prime[i], {i, 1, j - 1}]] == 1 &], k], {j, 2, k}]]]]; Table[ d[n], {n, 1, 15}]

A064989 Multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 11, 5, 6, 1, 13, 4, 17, 3, 10, 7, 19, 2, 9, 11, 8, 5, 23, 6, 29, 1, 14, 13, 15, 4, 31, 17, 22, 3, 37, 10, 41, 7, 12, 19, 43, 2, 25, 9, 26, 11, 47, 8, 21, 5, 34, 23, 53, 6, 59, 29, 20, 1, 33, 14, 61, 13, 38, 15, 67, 4, 71, 31, 18, 17, 35, 22, 73, 3, 16
Offset: 1

Views

Author

Vladeta Jovovic, Oct 30 2001

Keywords

Comments

From Antti Karttunen, May 12 2014: (Start)
a(A003961(n)) = n for all n. [This is a left inverse function for the injection A003961.]
Bisections are A064216 (the terms at odd indices) and A064989 itself (the terms at even indices), i.e., a(2n) = a(n) for all n.
(End)
From Antti Karttunen, Dec 18-21 2014: (Start)
When n represents an unordered integer partition via the indices of primes present in its prime factorization (for n >= 2, n corresponds to the partition given as the n-th row of A112798) this operation subtracts one from each part. If n is of the form 2^k (a partition having just k 1's as its parts) the result is an empty partition (which is encoded by 1, having an "empty" factorization).
For all odd numbers n >= 3, a(n) tells which number is located immediately above n in square array A246278. Cf. also A246277.
(End)
Alternatively, if numbers are represented as the multiset of indices of prime factors with multiplicity, this operation subtracts 1 from each element and discards the 0's. - M. F. Hasler, Dec 29 2014

Examples

			a(20) = a(2^2*5) = a(2^2)*a(5) = prevprime(5) = 3.
		

Crossrefs

Cf. A064216 (odd bisection), A003961 (inverse), A151799.
Other sequences whose definition involve or are some other way related with this sequence: A105560, A108951, A118306, A122111, A156552, A163511, A200746, A241909, A243070, A243071, A243072, A243073, A244319, A245605, A245607, A246165, A246266, A246268, A246277, A246278, A246361, A246362, A246371, A246372, A246373, A246374, A246376, A246380, A246675, A246682, A249745, A250470.
Similar prime-shifts towards smaller numbers: A252461, A252462, A252463.

Programs

  • Haskell
    a064989 1 = 1
    a064989 n = product $ map (a008578 . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A064989 n) (if (= 1 n) n (apply * (map (lambda (k) (if (zero? k) 1 (A000040 k))) (map -1+ (map A049084 (factor n)))))))
    ;; Antti Karttunen, May 12 2014
    (definec (A064989 n) (if (= 1 n) n (* (A008578 (A055396 n)) (A064989 (A032742 n))))) ;; One based on given recurrence and utilizing memoizing definec-macro.
    (definec (A064989 n) (cond ((= 1 n) n) ((even? n) (A064989 (/ n 2))) (else (A163511 (/ (- (A243071 n) 1) 2))))) ;; Corresponds to one of the alternative formulas, but is very unpractical way to compute this sequence. - Antti Karttunen, Dec 18 2014
    
  • Maple
    q:= proc(p) prevprime(p) end proc: q(2):= 1:
    [seq(mul(q(f[1])^f[2], f = ifactors(n)[2]), n = 1 .. 1000)]; # Robert Israel, Dec 21 2014
  • Mathematica
    Table[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, Jan 04 2016 *)
  • PARI
    { for (n=1, 1000, f=factor(n)~; a=1; j=1; if (n>1 && f[1, 1]==2, j=2); for (i=j, length(f), a*=precprime(f[1, i] - 1)^f[2, i]); write("b064989.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 02 2009
    
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((p=f[i,1]) % 2, f[i,1] = precprime(p-1), f[i,1] = 1);); factorback(f);} \\ Michel Marcus, Dec 18 2014
    
  • PARI
    A064989(n)=factorback(Mat(apply(t->[max(precprime(t[1]-1),1),t[2]],Vec(factor(n)~))~)) \\ M. F. Hasler, Dec 29 2014
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
    
  • Python
    from math import prod
    from sympy import prevprime, factorint
    def A064989(n): return prod(prevprime(p)**e for p, e in  factorint(n>>(~n&n-1).bit_length()).items()) # Chai Wah Wu, Jan 05 2023

Formula

From Antti Karttunen, Dec 18 2014: (Start)
If n = product A000040(k)^e(k) then a(n) = product A008578(k)^e(k) [where A000040(n) gives the n-th prime, and A008578(n) gives 1 for 1 and otherwise the (n-1)-th prime].
a(1) = 1; for n > 1, a(n) = A008578(A055396(n)) * a(A032742(n)). [Above formula represented as a recurrence. Cf. A252461.]
a(1) = 1; for n > 1, a(n) = A008578(A061395(n)) * a(A052126(n)). [Compare to the formula of A252462.]
This prime-shift operation is used in the definitions of many other sequences, thus it can be expressed in many alternative ways:
a(n) = A200746(n) / n.
a(n) = A242424(n) / A105560(n).
a(n) = A122111(A122111(n)/A105560(n)) = A122111(A052126(A122111(n))). [In A112798-partition context: conjugate, remove the largest part (the largest prime factor), and conjugate again.]
a(1) = 1; for n > 1, a(2n) = a(n), a(2n+1) = A163511((A243071(2n+1)-1) / 2).
a(n) = A249818(A250470(A249817(n))). [A250470 is an analogous operation for "going one step up" in the square array A083221 (A083140).]
(End)
Product_{k=1..n} a(k) = n! / A307035(n). - Vaclav Kotesovec, Mar 21 2019
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-q(p))) = 0.220703928... , where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Nov 18 2022

A001563 a(n) = n*n! = (n+1)! - n!.

Original entry on oeis.org

0, 1, 4, 18, 96, 600, 4320, 35280, 322560, 3265920, 36288000, 439084800, 5748019200, 80951270400, 1220496076800, 19615115520000, 334764638208000, 6046686277632000, 115242726703104000, 2311256907767808000, 48658040163532800000, 1072909785605898240000
Offset: 0

Views

Author

Keywords

Comments

A similar sequence, with the initial 0 replaced by 1, namely A094258, is defined by the recurrence a(2) = 1, a(n) = a(n-1)*(n-1)^2/(n-2). - Andrey Ryshevich (ryshevich(AT)notes.idlab.net), May 21 2002
Denominators in power series expansion of E_1(x) + gamma + log(x), x > 0. - Michael Somos, Dec 11 2002
If all the permutations of any length k are arranged in lexicographic order, the n-th term in this sequence (n <= k) gives the index of the permutation that rotates the last n elements one position to the right. E.g., there are 24 permutations of 4 items. In lexicographic order they are (0,1,2,3), (0,1,3,2), (0,2,1,3), ... (3,2,0,1), (3,2,1,0). Permutation 0 is (0,1,2,3), which rotates the last 1 element, i.e., it makes no change. Permutation 1 is (0,1,3,2), which rotates the last 2 elements. Permutation 4 is (0,3,1,2), which rotates the last 3 elements. Permutation 18 is (3,0,1,2), which rotates the last 4 elements. The same numbers work for permutations of any length. - Henry H. Rich (glasss(AT)bellsouth.net), Sep 27 2003
Stirling transform of a(n+1)=[4,18,96,600,...] is A083140(n+1)=[4,22,154,...]. - Michael Somos, Mar 04 2004
From Michael Somos, Apr 27 2012: (Start)
Stirling transform of a(n)=[1,4,18,96,...] is A069321(n)=[1,5,31,233,...].
Partial sums of a(n)=[0,1,4,18,...] is A033312(n+1)=[0,1,5,23,...].
Binomial transform of A000166(n+1)=[0,1,2,9,...] is a(n)=[0,1,4,18,...].
Binomial transform of A000255(n+1)=[1,3,11,53,...] is a(n+1)=[1,4,18,96,...].
Binomial transform of a(n)=[0,1,4,18,...] is A093964(n)=[0,1,6,33,...].
Partial sums of A001564(n)=[1,3,4,14,...] is a(n+1)=[1,4,18,96,...].
(End)
Number of small descents in all permutations of [n+1]. A small descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) =1. Example: a(2)=4 because there are 4 small descents in the permutations 123, 13\2, 2\13, 231, 312, 3\2\1 of {1,2,3} (shown by \). a(n)=Sum_{k=0..n-1}k*A123513(n,k). - Emeric Deutsch, Oct 02 2006
Equivalently, in the notation of David, Kendall and Barton, p. 263, this is the total number of consecutive ascending pairs in all permutations on n+1 letters (cf. A010027). - N. J. A. Sloane, Apr 12 2014
a(n-1) is the number of permutations of n in which n is not fixed; equivalently, the number of permutations of the positive integers in which n is the largest element that is not fixed. - Franklin T. Adams-Watters, Nov 29 2006
Number of factors in a determinant when writing down all multiplication permutations. - Mats Granvik, Sep 12 2008
a(n) is also the sum of the positions of the left-to-right maxima in all permutations of [n]. Example: a(3)=18 because the positions of the left-to-right maxima in the permutations 123,132,213,231,312 and 321 of [3] are 123, 12, 13, 12, 1 and 1, respectively and 1+2+3+1+2+1+3+1+2+1+1=18. - Emeric Deutsch, Sep 21 2008
Equals eigensequence of triangle A002024 ("n appears n times"). - Gary W. Adamson, Dec 29 2008
Preface the series with another 1: (1, 1, 4, 18, ...); then the next term = dot product of the latter with "n occurs n times". Example: 96 = (1, 1, 4, 8) dot (4, 4, 4, 4) = (4 + 4 + 16 + 72). - Gary W. Adamson, Apr 17 2009
Row lengths of the triangle in A030298. - Reinhard Zumkeller, Mar 29 2012
a(n) is also the number of minimum (n-)distinguishing labelings of the star graph S_{n+1} on n+1 nodes. - Eric W. Weisstein, Oct 14 2014
When the numbers denote finite permutations (as row numbers of A055089) these are the circular shifts to the right, i.e., a(n) is the permutation with the cycle notation (0 1 ... n-1 n). Compare array A051683 for circular shifts to the right in a broader sense. Compare sequence A007489 for circular shifts to the left. - Tilman Piesk, Apr 29 2017
a(n-1) is the number of permutations on n elements with no cycles of length n. - Dennis P. Walsh, Oct 02 2017
The number of pandigital numbers in base n+1, such that each digit appears exactly once. For example, there are a(9) = 9*9! = 3265920 pandigital numbers in base 10 (A050278). - Amiram Eldar, Apr 13 2020

Examples

			E_1(x) + gamma + log(x) = x/1 - x^2/4 + x^3/18 - x^4/96 + ..., x > 0. - _Michael Somos_, Dec 11 2002
G.f. = x + 4*x^2 + 18*x^3 + 96*x^4 + 600*x^5 + 4320*x^6 + 35280*x^7 + 322560*x^8 + ...
		

References

  • A. T. Benjamin and J. J. Quinn, Proofs that really count: the art of combinatorial proof, M.A.A. 2003, id. 218.
  • J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p. 336.
  • F. N. David, M. G. Kendall, and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Jerome Spanier and Keith B. Oldham, "Atlas of Functions", Hemisphere Publishing Corp., 1987, chapter 37, equation 37:6:1 at page 354.

Crossrefs

Cf. A163931 (E(x,m,n)), A002775 (n^2*n!), A091363 (n^3*n!), A091364 (n^4*n!).
Cf. sequences with formula (n + k)*n! listed in A282466.
Row sums of A185105, A322383, A322384, A094485.

Programs

  • GAP
    List([0..20], n-> n*Factorial(n) ); # G. C. Greubel, Dec 30 2019
  • Haskell
    a001563 n = a001563_list !! n
    a001563_list = zipWith (-) (tail a000142_list) a000142_list
    -- Reinhard Zumkeller, Aug 05 2013
    
  • Magma
    [Factorial(n+1)-Factorial(n): n in [0..20]]; // Vincenzo Librandi, Aug 08 2014
    
  • Maple
    A001563 := n->n*n!;
  • Mathematica
    Table[n!n,{n,0,25}] (* Harvey P. Dale, Oct 03 2011 *)
  • PARI
    {a(n) = if( n<0, 0, n * n!)} /* Michael Somos, Dec 11 2002 */
    
  • Sage
    [n*factorial(n) for n in (0..20)] # G. C. Greubel, Dec 30 2019
    

Formula

From Michael Somos, Dec 11 2002: (Start)
E.g.f.: x / (1 - x)^2.
a(n) = -A021009(n, 1), n >= 0. (End)
The coefficient of y^(n-1) in expansion of (y+n!)^n, n >= 1, gives the sequence 1, 4, 18, 96, 600, 4320, 35280, ... - Artur Jasinski, Oct 22 2007
Integral representation as n-th moment of a function on a positive half-axis: a(n) = Integral_{x=0..oo} x^n*(x*(x-1)*exp(-x)) dx, for n>=0. This representation may not be unique. - Karol A. Penson, Sep 27 2001
a(0)=0, a(n) = n*a(n-1) + n!. - Benoit Cloitre, Feb 16 2003
a(0) = 0, a(n) = (n - 1) * (1 + Sum_{i=1..n-1} a(i)) for i > 0. - Gerald McGarvey, Jun 11 2004
Arises in the denominators of the following identities: Sum_{n>=1} 1/(n*(n+1)*(n+2)) = 1/4, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)) = 1/18, Sum_{n>=1} 1/(n*(n+1)*(n+2)*(n+3)*(n+4)) = 1/96, etc. The general expression is Sum_{n>=k} 1/C(n, k) = k/(k-1). - Dick Boland, Jun 06 2005 [And the general expression implies that Sum_{n>=1} 1/(n*(n+1)*...*(n+k-1)) = (Sum_{n>=k} 1/C(n, k))/k! = 1/((k-1)*(k-1)!) = 1/a(k-1), k >= 2. - Jianing Song, May 07 2023]
a(n) = Sum_{m=2..n+1} |Stirling1(n+1, m)|, n >= 1 and a(0):=0, where Stirling1(n, m) = A048994(n, m), n >= m = 0.
a(n) = 1/(Sum_{k>=0} k!/(n+k+1)!), n > 0. - Vladeta Jovovic, Sep 13 2006
a(n) = Sum_{k=1..n(n+1)/2} k*A143946(n,k). - Emeric Deutsch, Sep 21 2008
The reciprocals of a(n) are the lead coefficients in the factored form of the polynomials obtained by summing the binomial coefficients with a fixed lower term up to n as the upper term, divided by the term index, for n >= 1: Sum_{k = i..n} C(k, i)/k = (1/a(n))*n*(n-1)*..*(n-i+1). The first few such polynomials are Sum_{k = 1..n} C(k, 1)/k = (1/1)*n, Sum_{k = 2..n} C(k, 2)/k = (1/4)*n*(n-1), Sum_{k = 3..n} C(k, 3)/k = (1/18)*n*(n-1)*(n-2), Sum_{k = 4..n} C(k, 4)/k = (1/96)*n*(n-1)*(n-2)*(n-3), etc. - Peter Breznay (breznayp(AT)uwgb.edu), Sep 28 2008
If we define f(n,i,x) = Sum_{k=i..n} Sum_{j=i..k} binomial(k,j)*Stirling1(n,k)* Stirling2(j,i)*x^(k-j) then a(n) = (-1)^(n-1)*f(n,1,-2), (n >= 1). - Milan Janjic, Mar 01 2009
Sum_{n>=1} (-1)^(n+1)/a(n) = 0.796599599... [Jolley eq. 289]
G.f.: 2*x*Q(0), where Q(k) = 1 - 1/(k+2 - x*(k+2)^2*(k+3)/(x*(k+2)*(k+3)-1/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 19 2013
G.f.: W(0)*(1-sqrt(x)) - 1, where W(k) = 1 + sqrt(x)/( 1 - sqrt(x)*(k+2)/(sqrt(x)*(k+2) + 1/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 18 2013
G.f.: T(0)/x - 1/x, where T(k) = 1 - x^2*(k+1)^2/( x^2*(k+1)^2 - (1-x-2*x*k)*(1-3*x-2*x*k)/T(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Oct 17 2013
G.f.: Q(0)*(1-x)/x - 1/x, where Q(k) = 1 - x*(k+1)/( x*(k+1) - 1/(1 - x*(k+1)/( x*(k+1) - 1/Q(k+1) ))); (continued fraction). - Sergei N. Gladkovskii, Oct 22 2013
D-finite with recurrence: a(n) +(-n-2)*a(n-1) +(n-1)*a(n-2)=0. - R. J. Mathar, Jan 14 2020
a(n) = (-1)^(n+1)*(n+1)*Sum_{k=1..n} A094485(n,k)*Bernoulli(k). The inverse of the Worpitzky representation of the Bernoulli numbers. - Peter Luschny, May 28 2020
From Amiram Eldar, Aug 04 2020: (Start)
Sum_{n>=1} 1/a(n) = Ei(1) - gamma = A229837.
Sum_{n>=1} (-1)^(n+1)/a(n) = gamma - Ei(-1) = A239069. (End)
a(n) = Gamma(n)*A000290(n) for n > 0. - Jacob Szlachetka, Jan 01 2022

A078898 Number of times the smallest prime factor of n is the smallest prime factor for numbers <= n; a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 4, 11, 1, 12, 2, 13, 5, 14, 1, 15, 1, 16, 6, 17, 3, 18, 1, 19, 7, 20, 1, 21, 1, 22, 8, 23, 1, 24, 2, 25, 9, 26, 1, 27, 4, 28, 10, 29, 1, 30, 1, 31, 11, 32, 5, 33, 1, 34, 12, 35, 1, 36, 1, 37, 13, 38, 3, 39, 1, 40, 14, 41, 1, 42, 6, 43
Offset: 0

Views

Author

Reinhard Zumkeller, Dec 12 2002

Keywords

Comments

From Antti Karttunen, Dec 06 2014: (Start)
For n >= 2, a(n) tells in which column of the sieve of Eratosthenes (see A083140, A083221) n occurs in. A055396 gives the corresponding row index.
(End)

Crossrefs

Programs

  • Haskell
    import Data.IntMap (empty, findWithDefault, insert)
    a078898 n = a078898_list !! n
    a078898_list = 0 : 1 : f empty 2 where
       f m x = y : f (insert p y m) (x + 1) where
               y = findWithDefault 0 p m + 1
               p = a020639 x
    -- Reinhard Zumkeller, Apr 06 2015
  • Maple
    N:= 1000: # to get a(0) to a(N)
    Primes:= select(isprime, [2,seq(2*i+1,i=1..floor((N-1)/2))]):
    A:= Vector(N):
    for p in Primes do
      t:= 1:
      A[p]:= 1:
      for n from p^2 to N by p do
        if A[n] = 0 then
           t:= t+1:
           A[n]:= t
        fi
      od
    od:
    0,1,seq(A[i],i=2..N); # Robert Israel, Jan 04 2015
  • Mathematica
    Module[{nn=90,spfs},spfs=Table[FactorInteger[n][[1,1]],{n,nn}];Table[ Count[ Take[spfs,i],spfs[[i]]],{i,nn}]] (* Harvey P. Dale, Sep 01 2014 *)
  • PARI
    \\ Not practical for computing, but demonstrates the sum moebius formula:
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A055396(n) = { if(1==n,0,primepi(A020639(n))); };
    A002110(n) = prod(i=1, n, prime(i));
    A078898(n) = { my(k,p); if(1==n, n, k = A002110(A055396(n)-1); p = A020639(n); sumdiv(k, d, moebius(d)*(n\(p*d)))); };
    \\ Antti Karttunen, Dec 05 2014
    
  • Scheme
    ;; With memoizing definec-macro.
    (definec (A078898 n) (if (< n 2) n (+ 1 (A078898 (A249744 n)))))
    ;; Much better for computing. Needs also code from A249738 and A249744. - Antti Karttunen, Dec 06 2014
    

Formula

Ordinal transform of A020639 (Lpf). - Franklin T. Adams-Watters, Aug 28 2006
From Antti Karttunen, Dec 05-08 2014: (Start)
a(0) = 0, a(1) = 1, a(n) = 1 + a(A249744(n)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(n / (A020639(n)*d)).
a(0) = 0, a(1) = 1, a(n) = sum_{d | A002110(A055396(n)-1)} moebius(d) * floor(A032742(n) / d).
[Instead of Moebius mu (A008683) one could use Liouville's lambda (A008836) in the above formulas, because all primorials (A002110) are squarefree. A020639(n) gives the smallest prime dividing n, and A055396 gives its index].
a(0) = 0, a(1) = 1, a(2n) = n, a(2n+1) = a(A250470(2n+1)). [After a similar recursive formula for A246277. However, this cannot be used for computing the sequence, unless a definition for A250470(n) is found which doesn't require computing the value of A078898(n).]
For n > 1: a(n) = A249810(n) - A249820(n).
(End)
Other identities:
a(2*n) = n.
For n > 1: a(n)=1 if and only if n is prime.
For n > 1: a(n) = A249808(n, A055396(n)) = A249809(n, A055396(n)).
For n > 1: a(n) = A246277(A249818(n)).
From Antti Karttunen, Jan 04 2015: (Start)
a(n) = 2 if and only if n is a square of a prime.
For all n >= 1: a(A251728(n)) = A243055(A251728(n)) + 2. That is, if n is a semiprime of the form prime(i)*prime(j), prime(i) <= prime(j) < prime(i)^2, then a(n) = (j-i)+2.
(End)
a(A000040(n)^2) = 2; a(A000040(n)*A000040(n+1)) = 3. - Reinhard Zumkeller, Apr 06 2015
Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Sum_{k>=1} (A038110(k)/A038111(k))^2 = 0.2847976823663... . - Amiram Eldar, Oct 26 2024

Extensions

a(0) = 0 prepended for recurrence's sake by Antti Karttunen, Dec 06 2014

A083221 Sieve of Eratosthenes arranged as an array and read by antidiagonals as 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, 25, 7, 10, 21, 35, 49, 11, 12, 27, 55, 77, 121, 13, 14, 33, 65, 91, 143, 169, 17, 16, 39, 85, 119, 187, 221, 289, 19, 18, 45, 95, 133, 209, 247, 323, 361, 23, 20, 51, 115, 161, 253, 299, 391, 437, 529, 29, 22, 57, 125, 203, 319, 377, 493, 551, 667
Offset: 2

Views

Author

Yasutoshi Kohmoto, Jun 05 2003

Keywords

Comments

This is permutation of natural numbers larger than 1.
From Antti Karttunen, Dec 19 2014: (Start)
If we assume here that a(1) = 1 (but which is not explicitly included because outside of the array), then A252460 gives an inverse permutation. See also A249741.
For navigating in this array:
A055396(n) gives the row number of row where n occurs, and A078898(n) gives its column number, both starting their indexing from 1.
A250469(n) gives the number immediately below n, and when n is an odd number >= 3, A250470(n) gives the number immediately above n. If n is a composite, A249744(n) gives the number immediately left of n.
First cube of each row, which is {the initial prime of the row}^3 and also the first number neither a prime or semiprime, occurs on row n at position A250474(n).
(End)
The n-th row contains the numbers whose least prime factor is the n-th prime: A020639(T(n,k)) = A000040(n). - Franklin T. Adams-Watters, Aug 07 2015

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,  25,  35,   55,   65,   85,   95,  115,  125,  145,  155,  175,  185
   7,  49,  77,   91,  119,  133,  161,  203,  217,  259,  287,  301,  329
  11, 121, 143,  187,  209,  253,  319,  341,  407,  451,  473,  517,  583
  13, 169, 221,  247,  299,  377,  403,  481,  533,  559,  611,  689,  767
  17, 289, 323,  391,  493,  527,  629,  697,  731,  799,  901, 1003, 1037
  19, 361, 437,  551,  589,  703,  779,  817,  893, 1007, 1121, 1159, 1273
  23, 529, 667,  713,  851,  943,  989, 1081, 1219, 1357, 1403, 1541, 1633
  29, 841, 899, 1073, 1189, 1247, 1363, 1537, 1711, 1769, 1943, 2059, 2117
  ...
		

Crossrefs

Transpose of A083140.
One more than A249741.
Inverse permutation: A252460.
Column 1: A000040, Column 2: A001248.
Row 1: A005843, Row 2: A016945, Row 3: A084967, Row 4: A084968, Row 5: A084969, Row 6: A084970.
Main diagonal: A083141.
First semiprime in each column occurs at A251717; A251718 & A251719 with additional criteria. A251724 gives the corresponding semiprimes for the latter. See also A251728.
Permutations based on mapping numbers between this array and A246278: A249817, A249818, A250244, A250245, A250247, A250249. See also: A249811, A249814, A249815.
Also used in the definition of the following arrays of permutations: A249821, A251721, A251722.

Programs

  • Mathematica
    lim = 11; a = Table[Take[Prime[n] Select[Range[lim^2], GCD[# Prime@ n, Product[Prime@ i, {i, 1, n - 1}]] == 1 &], lim], {n, lim}]; Flatten[Table[a[[i, n - i + 1]], {n, lim}, {i, n}]] (* Michael De Vlieger, Jan 04 2016, after Yasutoshi Kohmoto at A083140 *)

Extensions

More terms from Hugo Pfoertner, Jun 13 2003

A250469 a(1) = 1; and for n > 1, a(n) = A078898(n)-th number k for which A055396(k) = A055396(n)+1, where A055396(n) is the index of smallest prime dividing n.

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 21, 25, 27, 13, 33, 17, 39, 35, 45, 19, 51, 23, 57, 55, 63, 29, 69, 49, 75, 65, 81, 31, 87, 37, 93, 85, 99, 77, 105, 41, 111, 95, 117, 43, 123, 47, 129, 115, 135, 53, 141, 121, 147, 125, 153, 59, 159, 91, 165, 145, 171, 61, 177, 67, 183, 155, 189, 119, 195, 71, 201, 175, 207, 73, 213, 79, 219, 185, 225, 143, 231, 83, 237, 205, 243, 89, 249, 133, 255
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2014

Keywords

Comments

Permutation of odd numbers.
For n >= 2, a(n) = A078898(n)-th number k for which A055396(k) = A055396(n)+1. In other words, a(n) tells which number is located immediately below n in the sieve of Eratosthenes (see A083140, A083221) in the same column of the sieve that contains n.
A250471(n) = (a(n)+1)/2 is a permutation of natural numbers.
Coincides with A003961 in all terms which are primes. - M. F. Hasler, Sep 17 2016. Note: primes are a proper subset of A280693 which gives all n such that a(n) = A003961(n). - Antti Karttunen, Mar 08 2017

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[ 1, 1]]; For[k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[ FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1+2 == k2, Return[m2]]]]; Array[a, 100] (* Jean-François Alcover, Mar 08 2016 *)
    g[n_] := If[n == 1, 0, PrimePi@ FactorInteger[n][[1, 1]]]; Function[s, MapIndexed[Lookup[s, g[First@ #2] + 1][[#1]] - Boole[First@ #2 == 1] &, #] &@ Map[Position[Lookup[s, g@#], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 08 2017, Version 10 *)

Formula

a(1) = 1, a(n) = A083221(A055396(n)+1, A078898(n)).
a(n) = A249817(A003961(A249818(n))).
Other identities. For all n >= 1:
A250470(a(n)) = A268674(a(n)) = n. [A250470 and A268674 provide left inverses for this function.]
a(2n) = A016945(n-1). [Maps even numbers to the numbers of form 6n+3, in monotone order.]
a(A016945(n-1)) = A084967(n). [Which themselves are mapped to the terms of A084967, etc. Cf. the Example section of A083140.]
a(A000040(n)) = A000040(n+1). [Each prime is mapped to the next prime.]
For all n >= 2, A055396(a(n)) = A055396(n)+1. [A more general rule.]
A046523(a(n)) = A283465(n). - Antti Karttunen, Mar 08 2017

A299174 The positive even integers.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144
Offset: 1

Views

Author

Joss Langford, Feb 04 2018

Keywords

Comments

Possible periods of Post's {00, 1101} tag system. - Charles R Greathouse IV, Dec 13 2021
Numbers m such that 2^m - m is divisible by 2. - Bernard Schott, Dec 15 2021

Crossrefs

Equals A005843 without the leading zero.
Bisection of A000027. Complement of A004273. - Omar E. Pol, Feb 25 2018
First row of A083140.
Cf. A005408.
Essentially the same as A163300, A103517, A051755, A005843 and A004277.

Programs

Formula

a(n) = 2*n, n >= 1.
G.f.: 2*x/(1 - x)^2; corrected by Ilya Gutkovskiy, Mar 29 2018
a(n) = 2*a(n-1) - a(n-2). - Wesley Ivan Hurt, Jul 17 2025

A249818 Permutation of natural numbers: a(1) = 1, a(n) = A246278(A055396(n),A078898(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 27, 22, 23, 24, 25, 26, 21, 28, 29, 30, 31, 32, 45, 34, 35, 36, 37, 38, 33, 40, 41, 42, 43, 44, 81, 46, 47, 48, 49, 50, 75, 52, 53, 54, 125, 56, 63, 58, 59, 60, 61, 62, 39, 64, 55, 66, 67, 68, 135, 70, 71, 72, 73, 74, 51, 76, 77, 78, 79, 80, 99, 82, 83, 84, 175, 86, 105
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2014

Keywords

Comments

a(n) tells which number in square array A246278 is at the same position where n is in array A083221, the sieve of Eratosthenes. As both arrays have even numbers as their topmost row and primes as their leftmost column, both sequences are among the fixed points of this permutation.
Equally: a(n) tells which number in array A246279 is at the same position where n is in the array A083140, as they are the transposes of above two arrays.

Crossrefs

Inverse: A249817.
There are three different "deep" versions of this permutation, recursing on values of A055396(n) and/or A078898(n), namely: A250246, A250248 and A250250.
Other similar or related permutations: A249816.
Differs from its inverse A249817 for the first time at n=33, where a(33) = 45, while A249817(33) = 39.

Programs

  • Mathematica
    lim = 87; a003961[p_?PrimeQ] := a003961[p] = Prime[PrimePi@ p + 1]; a003961[1] = 1; a003961[n_] :=  a003961[n] = Times @@ (a003961[First@ #]^Last@ # &) /@ FactorInteger@ n; a055396[n_] := PrimePi[FactorInteger[n][[1, 1]]]; a078898 = Block[{nn = 90, spfs}, spfs = Table[FactorInteger[n][[1, 1]], {n, nn}]; Table[Count[Take[spfs, i], spfs[[i]]], {i, nn}]]; a246278 = NestList[Map[a003961, #] &, Table[2 k, {k, lim}], lim]; Table[a246278[[a055396@ n, a078898[[n]]]], {n, 2, lim}]
    (* Michael De Vlieger, Jan 04 2016, after Harvey P. Dale at A055396 and A078898 *)

Formula

a(1) = 1, a(n) = A246278(A055396(n), A078898(n)).
a(1) = 1, a(n) = A246278(A055396(n), A249822(A055396(n), A246277(n))).
As a composition of other permutations:
a(1) = 1, and for n > 1, a(n) = 1 + A249816(n-1).
Other identities. For all n >= 1:
a(A005843(n)) = A005843(n) and a(A000040(n)) = A000040(n). [Fixes even numbers and primes, among other numbers. Cf. comments above].
A020639(a(n)) = A020639(n) and A055396(a(n)) = A055396(n). [Preserves the smallest prime factor of n].

A084967 Multiples of 5 whose GCD with 6 is 1.

Original entry on oeis.org

5, 25, 35, 55, 65, 85, 95, 115, 125, 145, 155, 175, 185, 205, 215, 235, 245, 265, 275, 295, 305, 325, 335, 355, 365, 385, 395, 415, 425, 445, 455, 475, 485, 505, 515, 535, 545, 565, 575, 595, 605, 625, 635, 655, 665, 685, 695, 715, 725, 745, 755, 775, 785
Offset: 1

Views

Author

Robert G. Wilson v, Jun 15 2003

Keywords

Comments

Third row of A083140.
Positions of 5 in A020639. - Zak Seidov, Apr 29 2015

Crossrefs

Cf. A038110, A038111, A083140, A007310 (5-rough numbers), A273669.
Cf. A020639. - Zak Seidov, Apr 29 2015
Essentially the same as A063149.

Programs

  • Mathematica
    5Select[ Range[160], GCD[ #, 2*3] == 1 & ]
    Select[Range[5, 785, 10], Mod[#, 3] > 0 &] (* Zak Seidov, Apr 29 2015 *)
    a[1] = 5; a[n_] := a[n] = a[n - 1] + 10*(2 - Mod[n, 2]); Table[a[n], {n, 50}] (* Zak Seidov, Apr 29 2015 *)
  • PARI
    is(n)=n%5==0 && gcd(n,6)==1 \\ Charles R Greathouse IV, Nov 19 2014
    
  • PARI
    list(lim)=5*select(k->gcd(n,6)==1, [1..lim\5]) \\ Charles R Greathouse IV, Nov 19 2014

Formula

Numbers of the form 5k for which gcd(5k, 6) = 1.
a(n) = 5*A007310(n). - Adriano Caroli, Oct 03 2010
From Colin Barker, Feb 24 2013: (Start)
a(n) = 5*(-3 + (-1)^n + 6*n)/2.
a(n) = a(n-1) + a(n-2) - a(n-3).
G.f.: 5*x*(x^2+4*x+1) / ((x-1)^2*(x+1)). (End)
Limit_{n->infinity} a(n)/n = A038111(3)/A038110(3) = 15. - Vladimir Shevelev, Jan 20 2015
For n > 2, a(n) = a(n-2) + 30. - Zak Seidov, Apr 29 2015
a(n) = A007310(A273669(n)). - Antti Karttunen, May 20 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/(10*sqrt(3)). - Amiram Eldar, Nov 03 2022
Showing 1-10 of 47 results. Next