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 19 results. Next

A172170 1 followed by the duplicated entries of A090368.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 5, 7, 7, 3, 3, 11, 11, 13, 13, 3, 3, 17, 17, 19, 19, 3, 3, 23, 23, 5, 5, 3, 3, 29, 29, 31, 31, 3, 3, 5, 5, 37, 37, 3, 3, 41, 41, 43, 43, 3, 3, 47, 47, 7, 7, 3, 3, 53, 53, 5, 5, 3, 3, 59, 59, 61, 61, 3, 3, 5, 5, 67, 67, 3, 3, 71, 71, 73, 73, 3, 3, 7, 7, 79, 79, 3, 3, 83, 83, 5, 5
Offset: 0

Views

Author

Paul Curtz, Jan 28 2010

Keywords

Comments

We start from the expansion tan(x)+sec(x) = sum_{n>=1} A099612(n)/A099617(n) * x^n with Taylor coefficients 1, 1, 1/2, 1/3, 5/24, 2/15,...
The first differences of this sequence of fractions are 0, -1/2, -1/6, -1/8, -3/40, -7/144, -31/1008, -113/5760,... which is 0 followed by the negated ratios A034428(n)/(n+1)! = 0, -1/2, -1/6, -3/24, -9/120,....
(The factorial follows because A034428 is obtained by multiplying with 1-x to generate first differences of the o.g.f. and then moving on to the e.g.f.)
The common multiple to reduce numerator and denominator of A034428(n)/A000142(n+1) to the standard coprime representation is this sequence here.

Formula

a(2n+1)=a(2n+2) = A090368(n), n>=0.

A184726 a(n) = A005408(n-1)/A090368(n-1) for n > 2 and a(n) = 0 for n <= 2.

Original entry on oeis.org

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

Views

Author

Rémi Eismann, Jan 20 2011

Keywords

Comments

a(n) is the "level" of odd numbers.
The decomposition of odd numbers into weight * level + gap is A005408(n) = A090368(n-1) * a(n) + 2 if a(n) > 0.

Examples

			For n = 3 we have A005408(2)/A090368(2)= 3 / 3 = 1; hence a(3) = 1.
For n = 24 we have A005408(23)/A090368(23)= 45 / 3 = 14; hence a(24) = 15.
		

Crossrefs

A316858 Triangle read by rows constructed from A090368 as sum of least prime factors.

Original entry on oeis.org

6, 8, 8, 10, 10, 10, 6, 12, 12, 6, 14, 8, 14, 8, 14, 16, 16, 10, 10, 16, 16, 6, 18, 18, 6, 18, 18, 6, 20, 8, 20, 14, 14, 20, 8, 20, 22, 22, 10, 16, 22, 16, 10, 22, 22, 6, 24, 24, 6, 24, 24, 6, 24, 24, 6, 26, 8, 26, 20, 14, 26, 14, 20, 26, 8, 26, 8, 28, 10, 22, 28, 16, 16, 28, 22, 10, 28, 8
Offset: 1

Views

Author

Fred Daniel Kline, Jul 15 2018

Keywords

Comments

The greatest number in row k is 2*k + 4, thus consecutive rows identify consecutive even numbers (sums of two primes).
To get the n-th row: copy (1...n) of A090368, reverse, and add together.
When primes meet primes we get the maximum values. When primes or prime factors meet prime factors, we get lesser values. (Spot checked. Still empirical.)

Examples

			Triangle begins:
{ 6},         <--- copy (1,1) of A090368, add together
{ 8,  8},     <--- copy (1,2) of A090368, reverse, and add together
{10, 10, 10}, <--- copy (1,3) of A090368, reverse, and add together
{ 6, 12, 12,  6},
{14,  8, 14,  8, 14},
{16, 16, 10, 10, 16, 16},
{ 6, 18, 18,  6, 18, 18,  6}, <=== differences from A316859 begin here
{20,  8, 20, 14, 14, 20,  8, 20},
{22, 22, 10, 16, 22, 16, 10, 22, 22},
{ 6, 24, 24,  6, 24, 24,  6, 24, 24,  6},
{26,  8, 26, 20, 14, 26, 14, 20, 26,  8, 26},
{ 8, 28, 10, 22, 28, 16, 16, 28, 22, 10, 28,  8}
		

Crossrefs

Cf. A090368, A316859 (related triangle using gpfs).

Programs

  • Mathematica
    lpf[n_] := FactorInteger[2 n + 1][[1, 1]]; A090368 = Array[lpf, 12];
    a = Flatten[Table[A090368[[1 ;; -n]] + Reverse[A090368[[1 ;; -n]]],
        {n, Length[A090368], 1, -1}]];

A020639 Lpf(n): least prime dividing n (when n > 1); a(1) = 1. Or, smallest prime factor of n, or smallest prime divisor of n.

Original entry on oeis.org

1, 2, 3, 2, 5, 2, 7, 2, 3, 2, 11, 2, 13, 2, 3, 2, 17, 2, 19, 2, 3, 2, 23, 2, 5, 2, 3, 2, 29, 2, 31, 2, 3, 2, 5, 2, 37, 2, 3, 2, 41, 2, 43, 2, 3, 2, 47, 2, 7, 2, 3, 2, 53, 2, 5, 2, 3, 2, 59, 2, 61, 2, 3, 2, 5, 2, 67, 2, 3, 2, 71, 2, 73, 2, 3, 2, 7, 2, 79, 2, 3, 2, 83, 2, 5, 2, 3, 2, 89, 2, 7, 2, 3, 2, 5, 2, 97
Offset: 1

Views

Author

Keywords

Comments

Also, the largest number of distinct integers such that all their pairwise differences are coprime to n. - Max Alekseyev, Mar 17 2006
The unit 1 is not a prime number (although it has been considered so in the past). 1 is the empty product of prime numbers, thus 1 has no least prime factor. - Daniel Forgues, Jul 05 2011
a(n) = least m > 0 for which n! + m and n - m are not relatively prime. - Clark Kimberling, Jul 21 2012
For n > 1, a(n) = the smallest k > 1 that divides n. - Antti Karttunen, Feb 01 2014
For n > 1, records are at prime indices. - Zak Seidov, Apr 29 2015
The initials "lpf" might be mistaken for "largest prime factor" (A009190), using "spf" for "smallest prime factor" would avoid this. - M. F. Hasler, Jul 29 2015
n = 89 is the first index > 1 for which a(n) differs from the smallest k > 1 such that (2^k + n - 2)/k is an integer. - M. F. Hasler, Aug 11 2015
From Stanislav Sykora, Jul 29 2017: (Start)
For n > 1, a(n) is also the smallest k, 1 < k <= n, for which the binomial(n,k) is not divisible by n.
Proof: (A) When k and n are relatively prime then binomial(n,k) is divisible by n because k*binomial(n,k) = n*binomial(n-1,k-1). (B) When gcd(n,k) > 1, one of its prime factors is the smallest; let us denote it p, p <= k, and consider the binomial(n,p) = (1/p!)*Product_{i=0..p-1} (n-i). Since p is a divisor of n, it cannot be a divisor of any of the remaining numerator factors. It follows that, denoting as e the largest e > 0 such that p^e|n, the numerator is divisible by p^e but not by p^(e+1). Hence, the binomial is divisible by p^(e-1) but not by p^e and therefore not divisible by n. Applying (A), (B) to all considered values of k completes the proof. (End)
From Bob Selcoe, Oct 11 2017, edited by M. F. Hasler, Nov 06 2017: (Start)
a(n) = prime(j) when n == J (mod A002110(j)), n, j >= 1, where J is the set of numbers <= A002110(j) with smallest prime factor = prime(j). The number of terms in J is A005867(j-1). So:
a(n) = 2 when n == 0 (mod 2);
a(n) = 3 when n == 3 (mod 6);
a(n) = 5 when n == 5 or 25 (mod 30);
a(n) = 7 when n == 7, 49, 77, 91, 119, 133, 161 or 203 (mod 210);
etc. (End)
For n > 1, a(n) is the leftmost term, other than 0 or 1, in the n-th row of A127093. - Davis Smith, Mar 05 2019

References

  • D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, Section IV.1.

Crossrefs

Cf. A090368 (bisection).
Cf. A046669 (partial sums), A072486 (partial products).
Cf. A127093.

Programs

  • Haskell
    a020639 n = spf a000040_list where
      spf (p:ps) | n < p^2      = n
                 | mod n p == 0 = p
                 | otherwise    = spf ps
    -- Reinhard Zumkeller, Jul 13 2011
    
  • Maple
    A020639 := proc(n) if n = 1 then 1; else min(op(numtheory[factorset](n))) ; end if; end proc: seq(A020639(n),n=1..20) ; # R. J. Mathar, Oct 25 2010
  • Mathematica
    f[n_]:=FactorInteger[n][[1,1]]; Join[{1}, Array[f,120,2]]  (* Robert G. Wilson v, Apr 06 2011 *)
    Join[{1}, Table[If[EvenQ[n], 2, FactorInteger[n][[1,1]]], {n, 2, 120}]] (* Zak Seidov, Nov 17 2013 *)
    Riffle[Join[{1},Table[FactorInteger[n][[1,1]],{n,3,101,2}]],2] (* Harvey P. Dale, Dec 16 2021 *)
  • PARI
    A020639(n) = { vecmin(factor(n)[,1]) } \\ [Will yield an error for n = 1.] - R. J. Mathar, Mar 02 2012
    
  • PARI
    A020639(n)=if(n>1, if(n>n=factor(n,0)[1,1], n, factor(n)[1,1]), 1) \\ Avoids complete factorization if possible. Often the smallest prime factor can be found quickly even if it is larger than primelimit. If factoring takes too long for large n, use debugging level >= 3 (\g3) to display the smallest factor as soon as it is found. - M. F. Hasler, Jul 29 2015
    
  • Python
    from sympy import factorint
    def a(n): return 1 if n == 1 else min(factorint(n))
    print([a(n) for n in range(1, 98)]) # Michael S. Branicky, Dec 09 2021
  • Sage
    def A020639_list(n) : return [1] + [prime_divisors(n)[0] for n in (2..n)]
    A020639_list(97) # Peter Luschny, Jul 16 2012
    
  • Sage
    [trial_division(n) for n in (1..100)] # Giuseppe Coppoletta, May 25 2016
    
  • Scheme
    (define (A020639 n) (if (< n 2) n (let loop ((k 2)) (cond ((zero? (modulo n k)) k) (else (loop (+ 1 k))))))) ;; Antti Karttunen, Feb 01 2014
    

Formula

A014673(n) = a(A032742(n)); A115561(n) = a(A054576(n)). - Reinhard Zumkeller, Mar 10 2006
A028233(n) = a(n)^A067029(n). - Reinhard Zumkeller, May 13 2006
a(n) = A027746(n,1) = A027748(n,1). - Reinhard Zumkeller, Aug 27 2011
For n > 1: a(n) = A240694(n,2). - Reinhard Zumkeller, Apr 10 2014
a(n) = A000040(A055396(n)) = n / A032742(n). - Antti Karttunen, Mar 07 2017
a(n) has average order n/(2 log n) [Brouwer] - N. J. A. Sloane, Sep 03 2017

Extensions

Deleted wrong comment from M. Lagneau in 2012, following an observation by Gionata Neri. - M. F. Hasler, Aug 11 2015
Edited by M. F. Hasler, Nov 06 2017
Expanded definition to make this easier to find. - N. J. A. Sloane, Sep 21 2020

A112046 a(n) = the least k >= 1 for which the Jacobi symbol J(k,2n+1) is not +1 (thus is either 0 or -1).

Original entry on oeis.org

2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 7, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 11, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 5, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 5, 13, 2, 2, 3, 3, 2, 2, 3, 3, 2, 2, 7, 5, 2, 2, 3, 3, 2, 2
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2005

Keywords

Comments

If we instead list the least k >= 1, for which Jacobi symbol J(k,2n+1) is 0, we get A090368.
It is easy to see that every term is prime. Because the Jacobi symbol is multiplicative as J(ab,m) = J(a,m)*J(b,m) and if for every index i>=1 and < x, J(i,m)=1, then if J(x,m) is 0 or -1, x cannot be composite (say y*z, with both y and z less than x), as then either J(y,m) or J(z,m) would be non-one, which contradicts our assumption that x is the first index where non-one value appears. Thus x must be prime.

Crossrefs

One more than A112050.
Bisections: A112047, A112048, and their difference: A112053.

Programs

  • PARI
    A112046(n) = for(i=1, (2*n), if((kronecker(i, (n+n+1)) < 1), return(i))); \\ Antti Karttunen, May 26 2017
    
  • Python
    from sympy import jacobi_symbol as J
    def a(n):
        i=1
        while True:
            if J(i, 2*n + 1)!=1: return i
            else: i+=1
    print([a(n) for n in range(1, 103)]) # Indranil Ghosh, May 11 2017

Formula

a(n) = A112050(n) + 1 = A000040(A112049(n)).

A090369 Smallest divisor of 2n that is > 2, or 0 if no such divisor exists.

Original entry on oeis.org

0, 4, 3, 4, 5, 3, 7, 4, 3, 4, 11, 3, 13, 4, 3, 4, 17, 3, 19, 4, 3, 4, 23, 3, 5, 4, 3, 4, 29, 3, 31, 4, 3, 4, 5, 3, 37, 4, 3, 4, 41, 3, 43, 4, 3, 4, 47, 3, 7, 4, 3, 4, 53, 3, 5, 4, 3, 4, 59, 3, 61, 4, 3, 4, 5, 3, 67, 4, 3, 4, 71, 3, 73, 4, 3, 4, 7, 3, 79, 4, 3, 4, 83, 3, 5, 4, 3, 4, 89, 3, 7, 4, 3, 4, 5
Offset: 1

Views

Author

Lekraj Beedassy, Nov 27 2003

Keywords

Crossrefs

Programs

  • Maple
    A090369 := proc(n) local lf,i ; lf := numtheory[divisors](2*n) ; for i from 1 to nops(lf) do if op(i,lf) > 2 then RETURN( op(i,lf) ) ; fi ; od ; RETURN(0) ; end : for n from 0 to 100 do printf("%d,",A090369(n)) ; od ; # R. J. Mathar, Jun 02 2006
  • Mathematica
    Join[{0},Table[SelectFirst[Divisors[2n],#>2&],{n,2,120}]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 24 2017 *)

Extensions

More terms from Ray Chandler, Dec 02 2003
Edited by N. J. A. Sloane at the suggestion of Rémi Eismann, Sep 15 2007

A130703 a(n) = smallest k such that A000217(n+1) = A000217(n) + (A000217(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 9, 14, 10, 27, 35, 22, 18, 65, 77, 18, 26, 119, 27, 38, 34, 27, 209, 46, 28, 55, 299, 36, 35, 377, 45, 62, 58, 45, 527, 40, 54, 629, 95, 54, 74, 779, 63, 86, 82, 63, 989, 94, 54, 161, 235, 68, 91, 265, 81, 65, 106, 81, 145, 118, 90, 1769, 1829
Offset: 1

Views

Author

Rémi Eismann, Aug 16 2007 - Jan 10 2011

Keywords

Comments

a(n) is the weight of triangular numbers.
The decomposition of triangular numbers into weight * level + gap is A000217(n) = a(n) * A184219(n) + (n + 1) if a(n) > 0.

Examples

			For n = 1 we have A000217(n) = 1, A000217(n+1) = 3; there is no k such that 3 - 1 = 2 = (1 mod k), hence a(1) = 0.
For n = 5 we have A000217(n) = 15, A000217(n+1) = 21; 9 is the smallest k such that 21 - 15 = 6 = (15 mod k), hence a(5) = 9.
For n = 22 we have A000217(n) = 253, A000217(n+1) = 276; 46 is the smallest k such that 276 - 253 = 23 = (253 mod k), hence a(22) = 46.
		

Crossrefs

A177961 a(1)=2. Otherwise the average of the smallest prime divisors of 2n-1 and 2n+1.

Original entry on oeis.org

2, 4, 6, 5, 7, 12, 8, 10, 18, 11, 13, 14, 4, 16, 30, 17, 4, 21, 20, 22, 42, 23, 25, 27, 5, 28, 29, 4, 31, 60, 32, 4, 36, 35, 37, 72, 38, 5, 43, 41, 43, 44, 4, 46, 48, 5, 4, 51, 50, 52, 102, 53, 55, 108, 56, 58, 59, 4, 5, 9, 7, 4, 66, 65, 67, 69, 5, 70, 138, 71, 7, 8, 4, 76, 150, 77, 4, 81
Offset: 1

Views

Author

Vladimir Shevelev, May 16 2010, May 22 2010

Keywords

Comments

As n tends to infinity, we have 1) lim inf (a(n)/n)=0; 2) if there exist infinitely many twin primes, then lim sup (a(n)/n)=2, otherwise, lim sup (a(n)/n)=1.

Crossrefs

Programs

  • Magma
    [2] cat [1/2*(Min(PrimeFactors(2*n-1))+ Min(PrimeFactors(2*n+1))):n in [2..80]]; // Vincenzo Librandi, Feb 07 2016
  • Maple
    N:= 100: # to get a(1) to a(N)
    S:= [1,seq(min(numtheory:-factorset(2*i-1)),i=2..N+1)]:
    (S[2..-1]+S[1..-2])/2; # Robert Israel, Jul 31 2015
  • Mathematica
    Table[If[n == 1, 2, Mean[{FactorInteger[2 n - 1][[1, 1]], FactorInteger[2 n + 1][[1, 1]]}]], {n, 78}] (* Michael De Vlieger, Aug 02 2015 *)
  • PARI
    a(n) = if (n==1, 2, (vecmin(factor(2*n-1)[,1]) + vecmin(factor(2*n+1)[,1]))/2); \\ Michel Marcus, Feb 07 2016
    

Formula

a(n) = (A090368(n)+A090368(n+1))/2. [R. J. Mathar, May 31 2010]

Extensions

More terms from R. J. Mathar, May 31 2010

A130882 a(n) = smallest k such that A002808(n+1) = A002808(n) + (A002808(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 4, 7, 2, 4, 5, 13, 2, 7, 4, 19, 2, 4, 23, 2, 5, 2, 13, 4, 31, 2, 3, 2, 17, 37, 2, 19, 4, 43, 2, 4, 47, 2, 7, 2, 5, 53, 2, 5, 2, 4, 29, 61, 2, 3, 2, 4, 67, 2, 4, 5, 73, 2, 3, 2, 4, 79, 2, 4, 83, 2, 5, 2, 43, 89, 2, 7, 2, 3, 2, 47, 97
Offset: 1

Views

Author

Rémi Eismann, Aug 21 2007 - Jan 09 2011

Keywords

Comments

a(n) is the "weight" of composite numbers.
The decomposition of composite numbers into weight * level + gap is A002808(n) = a(n) * A179621(n) + A073783(n) if a(n) > 0.

Examples

			For n = 1 we have A002808(n) = 4, A002808(n+1) = 6; there is no k such that 6 - 4 = 2 = (4 mod k), hence a(1) = 0.
For n = 3 we have A002808(n) = 8, A002808(n+1) = 9; 7 is the smallest k such that 9 - 8 = 1 = (8 mod k), hence a(3) = 7.
For n = 24 we have A002808(n) = 36, A002808(n+1) = 38; 17 is the smallest k such that 38 - 36 = 2 = (36 mod k), hence a(24) = 17.
		

Crossrefs

A133150 a(n) = smallest k such that A000290(n+1) = A000290(n) + (A000290(n) mod k), or 0 if no such k exists.

Original entry on oeis.org

0, 0, 0, 0, 14, 23, 17, 47, 31, 79, 49, 119, 71, 167, 97, 223, 127, 41, 46, 359, 199, 439, 241, 527, 82, 89, 337, 727, 391, 839, 449, 137, 73, 1087, 577, 1223, 647, 1367, 103, 217, 94, 1679, 881, 1847, 967, 119, 151, 2207, 1151, 2399, 1249, 113, 193, 401, 1457
Offset: 1

Views

Author

Rémi Eismann, Sep 22 2007 - Jan 10 2011

Keywords

Comments

a(n) is the "weight" of squares (A000290).
The decomposition of squares into weight * level + gap is A000217(n) = a(n) * A184221(n) + A005408(n) if a(n) > 0.

Examples

			For n = 1 we have A000290(n) = 1, A000290(n+1) = 4; there is no k such that 4 - 1 = 3 = (1 mod k), hence a(1) = 0.
For n = 5 we have A000290(n) = 25, A000290(n+1) = 36; 14 is the smallest k such that 36 - 25 = 11 = (25 mod k), hence a(5) = 14.
For n = 18 we have A000290(n) = 324, A000290(n+1) = 361; 41 is the smallest k such that 361 - 324 = 37 = (324 mod k), hence a(18) = 41.
		

Crossrefs

Showing 1-10 of 19 results. Next