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-9 of 9 results.

A325962 a(1) = 1; for n > 1, a(n) is the largest k <= 1+A046666(n) such that n-k and n-(sigma(n)-k) are relatively prime, or -1 if no such nonnegative k exists.

Original entry on oeis.org

1, 1, 0, 3, 0, 5, 0, 7, 7, 9, 0, 11, 0, 13, 10, 15, 0, 17, 0, 19, 18, 21, 0, 23, 21, 25, 24, 27, 0, 29, 0, 31, 28, 33, 30, 35, 0, 37, 36, 39, 0, 41, 0, 43, 40, 45, 0, 47, 43, 49, 44, 51, 0, 53, 50, 55, 54, 57, 0, 59, 0, 61, 60, 63, 60, 65, 0, 67, 64, 69, 0, 71, 0, 73, 72, 75, 70, 77, 0, 79, 79, 81, 0, 83, 80, 85, 82, 87, 0, 89, 82
Offset: 1

Views

Author

Antti Karttunen, May 29 2019

Keywords

Comments

a(n) is equal to A325817(n) only with odd primes and the even terms of A000396. a(n) = -1 only on odd perfect numbers, if such numbers exist. Otherwise a(n) = 2n - A325961(n).

Crossrefs

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A325962(n) = { my(s=sigma(n)); forstep(i=1+n-A020639(n), 0, -1, if(1==gcd(n-i, n-(s-i)), return(i))); (-1); };

Formula

For all n, a(A065091(n)) = 0.

A046667 a(n) = A046666(n)/2.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A046666.

Programs

  • Mathematica
    Table[(1/2)(n - First@(First/@FactorInteger[n])), {n, 2, 100}] (* Vincenzo Librandi, Apr 08 2020 *)
  • PARI
    a(n)={if(n==1, 0, my(f=factor(n)[,1]); (n-f[1])/2)} \\ Andrew Howroyd, Mar 07 2020

A061228 a(1) = 2, a(n) = smallest number greater than n that is not coprime to n.

Original entry on oeis.org

2, 4, 6, 6, 10, 8, 14, 10, 12, 12, 22, 14, 26, 16, 18, 18, 34, 20, 38, 22, 24, 24, 46, 26, 30, 28, 30, 30, 58, 32, 62, 34, 36, 36, 40, 38, 74, 40, 42, 42, 82, 44, 86, 46, 48, 48, 94, 50, 56, 52, 54, 54, 106, 56, 60, 58, 60, 60, 118, 62, 122, 64, 66, 66, 70, 68, 134, 70, 72, 72
Offset: 1

Views

Author

Amarnath Murthy, Apr 23 2001

Keywords

Examples

			a(9) = 12 as 10 and 11 are coprime to 9.
a(11) = 22 as 11 is a prime.
		

Crossrefs

Programs

  • Haskell
    a061228 n = n + a020639 n  -- Reinhard Zumkeller, May 06 2015
    
  • Maple
    for n from 1 to 150 do if n=1 then printf(`%d,`,2); fi: for k from n+1 to 2*n do if igcd(n,k)>1 then printf(`%d,`,k); break; fi: od: od:
    # alternative:
    2, seq(t + min(numtheory:-factorset(t)), t = 2..1000); # Robert Israel, Oct 21 2015
  • Mathematica
    Table[n+First@(First/@FactorInteger[n]),{n,200}] (* Vladimir Joseph Stephan Orlovsky, Apr 08 2011 *)
    nxt[{n_,a_}]:=Module[{c=n+2},While[CoprimeQ[n+1,c],c++];{n+1,c}]; NestList[nxt,{1,2},70][[;;,2]] (* Harvey P. Dale, May 21 2025 *)
  • PARI
    a(n) = n + if(n == 1, 1, factor(n)[1,1]); \\ Amiram Eldar, Apr 10 2025

Formula

a(n) = A020639(n) + n.
a(2m) = 2m+2, a(p) = 2p if p is a prime.
a(n) = n + the smallest divisor of n that is larger than 1, for n >= 2.
a(p^k) = p^k + p if p is prime. - Robert Israel, Oct 21 2015
a(n) = A087349(n-1) + 1 for n >= 2. - Amiram Eldar, Apr 10 2025

Extensions

More terms from James Sellers, Apr 24 2001

A175126 a(0) = a(1) = 0, for n >= 2, a(n) = number of steps of iteration of {r - (smallest prime divisor of r)} needed to reach 0 starting at r = n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Feb 15 2010

Keywords

Comments

See A005843 and A175127 for the smallest and greatest numbers m such that a(m) = k for k >= 2.

Examples

			Example (a(6)=3): 6-2=4, 4-2=2, 2-2=0; iterations has 3 steps.
a(25) = 11, as we have 25 -> 20 -> 18 -> 16 -> 14 -> 12 -> 10 -> 8 -> 6 -> 4 -> 2 -> 0, in total eleven steps to reach zero. - _Antti Karttunen_, Aug 22 2019
		

Crossrefs

From a(2) on, one more than A046667.

Programs

  • Maple
    Contribution from R. J. Mathar, Mar 11 2010: (Start)
    A020639 := proc(n) min(op(numtheory[factorset](n))) ; end proc:
    A046666 := proc(n) n-A020639(n) ; end proc:
    A175126 := proc(n) local a; if n = 1 then 0; elif n = 0 then 0; else 1+procname(A046666(n)) ; end if; end proc:
    seq(A175126(n),n=1..100) ; (End)
  • Mathematica
    stps[n_]:=Length[NestWhileList[#-FactorInteger[#][[1,1]]&,n,#>0&]]-1; Join[{0},Rest[Array[stps,90]]] (* Harvey P. Dale, Aug 15 2012 *)
  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A175126(n) = if(n<2,0,1+A175126(n-A020639(n))); \\ Antti Karttunen, Aug 22 2019
    
  • PARI
    a(n) = if(n>1, (n-factor(n)[1, 1])/2 + 1, 0) \\ Jianing Song, Aug 07 2022

Formula

a(2n) = n >= 2; a(p) = 1 for p = prime.
a(n) = 0 if n<=1, else a(n) = 1+a(A046666(n)). - R. J. Mathar, Mar 11 2010
a(n) = (n-lpf(n))/2 + 1 for n > 1, lpf = A020639. - Jianing Song, Aug 07 2022

Extensions

Corrected A-number typo in the comment - R. J. Mathar, Mar 11 2010
Extended beyond a(30) by R. J. Mathar, Mar 11 2010
Term a(0) = 0 prepended by Antti Karttunen, Aug 22 2019

A326148 Odd numbers > 1, not powers of primes, for which A326147(n) is equal to abs(A326146(n)).

Original entry on oeis.org

15, 91, 207, 703, 847, 1023, 1891, 2701, 2725, 5551, 12403, 15043, 18721, 19359, 38503, 49141, 79003, 88831, 104653, 146611, 148951, 188191, 218791, 226801, 269011, 286903, 346957, 385003, 497503, 597871, 665281, 721801, 736291, 765703, 873181, 954271, 1056331, 1207359, 1314631, 1345873, 1373653, 1537381, 1755001
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2019

Keywords

Comments

Odd numbers > 1, not powers of primes, for which A326146(n) [= (sigma(n)-A020639(n)-n)] is not zero and divides n-A020639(n).
Question: Are any of these terms present also in A326064 and A326074? None of the first 519 terms are. If such intersections are empty, then there are no odd perfect numbers.
Of the first 519 terms, 485 are semiprimes.

Crossrefs

Programs

  • PARI
    A020639(n) = if(1==n, n, factor(n)[1, 1]);
    A326146(n) = (sigma(n)-A020639(n)-n);
    A326147(n) = gcd(n-A020639(n), sigma(n)-A020639(n)-n);
    isA326148(n) = if((n>1)&&(n%2)&&!isprimepower(n), my(s=factor(n)[1, 1], t=n-s, u=sigma(n)-s-n); (u && !(t%u)), 0);

A326147 a(n) = gcd(n-A020639(n), sigma(n)-A020639(n)-n), where A020639 gives the smallest prime factor of n, and sigma is the sum of divisors of n.

Original entry on oeis.org

1, 1, 2, 1, 4, 4, 6, 1, 1, 2, 10, 2, 12, 4, 6, 1, 16, 1, 18, 2, 2, 4, 22, 2, 1, 2, 2, 26, 28, 4, 30, 1, 6, 2, 2, 1, 36, 4, 2, 2, 40, 4, 42, 2, 6, 4, 46, 2, 1, 1, 6, 2, 52, 4, 2, 2, 2, 2, 58, 2, 60, 4, 2, 1, 2, 4, 66, 2, 6, 4, 70, 1, 72, 2, 2, 2, 2, 4, 78, 26, 1, 2, 82, 2, 2, 4, 6, 2, 88, 2, 14, 2, 2, 4, 10, 2, 96, 1, 6, 1, 100, 4, 102, 2, 6
Offset: 1

Views

Author

Antti Karttunen, Jun 10 2019

Keywords

Crossrefs

Programs

Formula

a(n) = gcd(n-A020639(n), A000203(n)-A020639(n)-n).
For n > 1, a(n) = gcd(A046666(n), A326146(n)).

A175127 a(n) = the largest numbers m with the number of steps n of iterations of {r - (smallest prime divisor of r)} needed to reach 0 starting at r = m .

Original entry on oeis.org

4, 6, 9, 10, 12, 15, 16, 18, 21, 25, 24, 27, 28, 30, 35, 34, 36, 39, 40, 42, 49, 46, 48, 51, 55, 54, 57, 58, 60, 65, 64, 66, 69, 70, 77, 75, 76, 78, 81, 85, 84, 91, 88, 90, 95, 94, 96, 99, 100, 102, 105, 106, 108, 111, 121, 119, 117, 118, 120, 125, 124, 126, 133, 130, 132
Offset: 2

Views

Author

Jaroslav Krizek, Feb 15 2010

Keywords

Comments

A175126(a(n)) = A175126(A005843(n)) = n. [From Jaroslav Krizek, May 12 2010]

Examples

			Example (a(4)=9): 9-3=6, 6-2=4, 4-2=2, 2-2=0; iterations has 4 steps and number 9 is the largest number with such result.
		

Crossrefs

Extensions

Edited by R. J. Mathar, Mar 11 2010

A383777 a(n) is the number of steps that n requires to reach 0 under the map: x -> 2*x + 1 if x is even; 0 if x = 1; x - lpf(x) otherwise where lpf(x) is the least prime factor of x. a(n) = -1 if 0 is never reached.

Original entry on oeis.org

0, 1, 2, 1, 4, 1, 2, 1, 2, 3, 4, 1, 4, 1, 2, 5, 4, 1, 2, 1, 2, 3, 10, 1, 10, 3, 2, 11, 4, 1, 2, 1, 10, 3, 12, 3, 2, 1, 6, 3, 4, 1, 8, 1, 2, 9, 4, 1, 2, 9, 2, 3, 6, 1, 2, 3, 2, 3, 4, 1, 8, 1, 4, 9, 10, 9, 10, 1, 2, 11, 4, 1, 4, 1, 2, 5, 10, 5, 2, 1, 6, 3, 6, 1
Offset: 0

Views

Author

Ya-Ping Lu, May 17 2025

Keywords

Comments

Conjecture: a(n) != -1.

Examples

			a(10) = 4 because it takes 4 steps for 10 to reach 1 by iterating the map: 10 -> 2*10+1=21 -> 21-3=18 -> 2*18+1=37 -> 37-37=0.
		

Crossrefs

Programs

  • Mathematica
    A383777[n_] := Length[NestWhileList[If[OddQ[#], # - FactorInteger[#][[1,1]], 2*# + 1] &, n, # >0 &]] - 1;
    Array[A383777, 100, 0] (* Paolo Xausa, May 22 2025 *)
  • Python
    from sympy import primefactors; mp = lambda x: (0 if x ==1 else x - min(primefactors(x)) if x%2 else 2*x+1)
    def A383777(n, c = 0):
        while n != 0: n = mp(n); c += 1
        return c

A380600 Irregular table T(n, k), n > 0, k = 1..A000005(n) read by rows: the n-th row lists the numbers of the form n * (d-1) / d with d a positive divisor of n.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 2, 3, 0, 4, 0, 3, 4, 5, 0, 6, 0, 4, 6, 7, 0, 6, 8, 0, 5, 8, 9, 0, 10, 0, 6, 8, 9, 10, 11, 0, 12, 0, 7, 12, 13, 0, 10, 12, 14, 0, 8, 12, 14, 15, 0, 16, 0, 9, 12, 15, 16, 17, 0, 18, 0, 10, 15, 16, 18, 19, 0, 14, 18, 20, 0, 11, 20, 21, 0, 22
Offset: 1

Views

Author

Rémy Sigrist, Feb 02 2025

Keywords

Examples

			Table T(n, k) begins:
  n   n-th row
  --  ------------------
   1  0
   2  0, 1
   3  0, 2
   4  0, 2, 3
   5  0, 4
   6  0, 3, 4, 5
   7  0, 6
   8  0, 4, 6, 7
   9  0, 6, 8
  10  0, 5, 8, 9
  11  0, 10
  12  0, 6, 8, 9, 10, 11
  13  0, 12
  14  0, 7, 12, 13
		

Crossrefs

Programs

  • Mathematica
    Table[Map[n*(# - 1)/# &, Divisors[n]], {n, 23}] // Flatten (* Michael De Vlieger, Feb 03 2025 *)
  • PARI
    row(n) = apply (d -> n*(d-1)/d, divisors(n))

Formula

T(n, k) = n * (A027750(n, k) - 1) / A027750(n, k).
Sum_{k = 1..A000005(n)} T(n, k) = A094471(n).
Product_{k = 2..A000005(n)} T(n, k) = A072513(n).
LCM{k = 2..A000005(n)} T(n, k) = A258324(n).
T(n, 1) = 0.
T(n, 2) = A060681(n) for any n > 1. - Michel Marcus, Feb 03 2025
T(n, A000005(n)-1) = A046666(n) for any n > 1.
T(n, A000005(n)) = n-1.
Showing 1-9 of 9 results.