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

A337903 a(0) = 0, a(1) = 1; for n>1, if a(n-1) is composite then a(n) = a(n-1)/A107286(n-1), where A107286(n) = the smallest prime factor of n, otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

0, 1, 3, 6, 3, 8, 4, 2, 10, 5, 15, 5, 17, 30, 15, 5, 21, 7, 25, 5, 25, 5, 27, 9, 3, 28, 14, 7, 35, 7, 37, 68, 34, 17, 51, 17, 53, 90, 45, 15, 5, 46, 23, 66, 33, 11, 57, 19, 67, 116, 58, 29, 81, 27, 9, 3, 59, 116, 58, 29, 89, 150, 75, 25, 5, 70, 35, 7, 75, 25, 5, 76, 38, 19, 93, 31, 107, 184, 92
Offset: 0

Views

Author

Scott R. Shannon, Sep 29 2020

Keywords

Comments

The sequence can only increase for two consecutive terms at most as if a(n) is even then a(n+1) will be a(n)/2, while if a(n) is odd and a(n+1) is prime then a(n+2) will be even and thus a(n+3) = a(n+2)/2.
For the first 100 million terms the lowest number not to have appeared is 888. It is likely all numbers eventually appear although this is unknown.

Examples

			a(3) = 6 as a(2) = 3 which is prime thus a(3) = 3 + 3 = 6.
a(4) = 3 as a(3) = 6 which has the smallest divisor 2 thus a(4) = 6/2 = 3.
a(11) = 5 as a(10) = 15 which has the smallest divisor 3 thus a(11) = 15/3 = 5.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0;  a[1] = 1; a[n_] := a[n] = If[CompositeQ[a[n - 1]], a[n - 1]/FactorInteger[a[n - 1]][[1, 1]], a[n - 1] + n]; Array[a, 100, 0] (* Amiram Eldar, Sep 30 2020 *)

A217581 Largest prime divisor of n <= sqrt(n), 1 if n is prime or 1.

Original entry on oeis.org

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

Views

Author

Peter Luschny, Mar 21 2013

Keywords

Comments

If we define a divisor d|n to be inferior if d <= n/d, then inferior divisors are counted by A038548 and listed by A161906. This sequence selects the greatest inferior prime divisor of n. - Gus Wiseman, Apr 06 2021

Examples

			From _Gus Wiseman_, Apr 06 2021: (Start)
The sequence selects the greatest element (or 1 if empty) of each of the following sets of strictly superior divisors:
   1:{}     16:{2}      31:{}     46:{2}
   2:{}     17:{}       32:{2}    47:{}
   3:{}     18:{2,3}    33:{3}    48:{2,3}
   4:{2}    19:{}       34:{2}    49:{7}
   5:{}     20:{2}      35:{5}    50:{2,5}
   6:{2}    21:{3}      36:{2,3}  51:{3}
   7:{}     22:{2}      37:{}     52:{2}
   8:{2}    23:{}       38:{2}    53:{}
   9:{3}    24:{2,3}    39:{3}    54:{2,3}
  10:{2}    25:{5}      40:{2,5}  55:{5}
  11:{}     26:{2}      41:{}     56:{2,7}
  12:{2,3}  27:{3}      42:{2,3}  57:{3}
  13:{}     28:{2}      43:{}     58:{2}
  14:{2}    29:{}       44:{2}    59:{}
  15:{3}    30:{2,3,5}  45:{3,5}  60:{2,3,5}
(End)
		

Crossrefs

Cf. A033676.
Positions of first appearances are 1 and A001248.
These divisors are counted by A063962.
These divisors add up to A097974.
The smallest prime factor of the same type is A107286.
A strictly superior version is A341643.
A superior version is A341676.
A038548 counts superior (or inferior) divisors.
A048098 lists numbers without a strictly superior prime divisor.
A056924 counts strictly superior (or strictly inferior) divisors.
A063538/A063539 have/lack a superior prime divisor.
A140271 selects the smallest strictly superior divisor.
A161906 lists inferior divisors.
A207375 lists central divisors.
A341591 counts superior prime divisors.
A341642 counts strictly superior prime divisors.
A341673 lists strictly superior divisors.
- Inferior: A066839, A069288, A333749, A333750.
- Strictly Inferior: A060775, A333805, A333806, A341596, A341674.
- Strictly Superior: A238535, A341594, A341595, A341644, A341645, A341646.

Programs

  • Maple
    A217581 := n -> `if`(isprime(n) or n=1, 1, max(op(select(i->i^2<=n, numtheory[factorset](n)))));
  • Mathematica
    Table[If[n == 1 || PrimeQ[n], 1, Select[Transpose[FactorInteger[n]][[1]], # <= Sqrt[n] &][[-1]]], {n, 100}] (* T. D. Noe, Mar 25 2013 *)
  • PARI
    a(n) = {my(m=1); foreach(factor(n)[,1], d, if(d^2 <= n, m=max(m,d))); m} \\ Andrew Howroyd, Oct 11 2023

A341676 The unique superior prime divisor of each number that has one.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Feb 23 2021

Keywords

Comments

We define a divisor d|n to be superior if d >= n/d. Superior divisors are counted by A038548 and listed by A161908. Numbers with a superior prime divisor are listed by A063538.

Examples

			The sequence of superior prime divisors begins: {}, {2}, {3}, {2}, {5}, {3}, {7}, {}, {3}, {5}, {11}, {}, {13}, {7}, {5}, {}, {17}, {}, {19}, {5}, ...
		

Crossrefs

Inferior versions are A107286 (smallest), A217581 (largest), A056608.
These divisors (superior prime) are counted by A341591.
The strictly superior version is A341643.
A001221 counts prime divisors, with sum A001414.
A033676 selects the greatest inferior divisor.
A033677 selects the smallest superior divisor.
A038548 counts superior (or inferior) divisors.
A056924 counts strictly superior (or strictly inferior) divisors.
A060775 selects the greatest strictly inferior divisor.
A063538/A063539 have/lack a superior prime divisor.
A070038 adds up superior divisors.
A140271 selects the smallest strictly superior divisor.
A161908 lists superior divisors.
A207375 lists central divisors.
- Strictly Inferior: A070039, A333805, A333806, A341596, A341674, A341677.

Programs

  • Mathematica
    Join@@Table[Select[Divisors[n],PrimeQ[#]&&#>=n/#&],{n,100}]
  • PARI
    lista(nmax) = {my(p); for(n = 1, nmax, p = select(x -> (x^2 >= n), factor(n)[, 1]); if(#p == 1, print1(p[1], ", ")));} \\ Amiram Eldar, Nov 01 2024

A328337 The number whose binary indices are the nontrivial divisors of n (greater than 1 and less than n).

Original entry on oeis.org

0, 0, 0, 2, 0, 6, 0, 10, 4, 18, 0, 46, 0, 66, 20, 138, 0, 294, 0, 538, 68, 1026, 0, 2222, 16, 4098, 260, 8266, 0, 16950, 0, 32906, 1028, 65538, 80, 133422, 0, 262146, 4100, 524954, 0, 1056870, 0, 2098186, 16660, 4194306, 0, 8423598, 64, 16777746, 65540
Offset: 1

Views

Author

Gus Wiseman, Oct 15 2019

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The nontrivial divisors of 18 are {2, 3, 6, 9}, so a(18) = 2^1 + 2^2 + 2^5 + 2^8 = 294.
		

Crossrefs

Removing zeros gives binary indices of rows of A163870.
The version for all divisors is A034729.
The version for proper divisors is A247146.

Programs

  • Mathematica
    Table[Total[(2^DeleteCases[Divisors[n],1|n])/2],{n,100}]
  • Python
    from sympy import divisors
    def A328337(n): return sum(1<<(d-1) for d in divisors(n,generator=True) if 1Chai Wah Wu, Jul 15 2022

Formula

A000120(a(n)) = A070824(n).
A070939(a(n)) = A032742(n).
A001511(a(n)) = A107286(n).

A377403 For n >= 2, a(n) is the number of iterations needed for the map: x -> x / A085392(x) if A085392(x) > 1, otherwise x -> x + A151800(x), to (the first occurrence of) 2.

Original entry on oeis.org

0, 3, 1, 3, 1, 3, 2, 4, 1, 4, 2, 3, 1, 4, 3, 4, 2, 3, 2, 4, 1, 3, 3, 4, 1, 5, 2, 4, 2, 3, 4, 4, 1, 4, 3, 3, 1, 4, 3, 4, 2, 4, 2, 5, 1, 4, 4, 4, 2, 4, 2, 5, 3, 4, 3, 4, 1, 5, 3, 7, 1, 5, 5, 4, 2, 3, 2, 4, 2, 6, 4, 4, 1, 5, 2, 4, 2, 5, 4, 6, 1, 3, 3, 4, 1, 4, 3, 3, 3, 4, 2, 4, 1, 4, 5, 4, 2, 5, 3, 4, 2, 4, 3, 5, 1, 6, 4, 3, 2, 4, 4, 6, 2, 4, 2, 5, 1, 4, 4, 5
Offset: 2

Views

Author

Ctibor O. Zizka, Oct 27 2024

Keywords

Comments

Also a(2*k + 1) = A001222(2*k + 1) + 2 + s, where s >= 1 for k = 5, 8, 14, 20, 21, 23, 26, 29, 30, 35, 36, 39, 48, 50, 51, ...

Examples

			n = 3: 3 -> 8 -> 4 -> 2, 3 iterations needed to reach 2, thus a(3) = 3.
n = 9: 9 -> 3 -> 8 -> 4 -> 2, 4 iterations needed to reach 2, thus a(9) = 4.
n = 11: 11 -> 24 -> 8 -> 4 - > 2, 4 iterations needed to reach 2, thus a(11) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[2] = 0; a[n_] := -1 + Length@ NestWhileList[If[CompositeQ[#], #/FactorInteger[#][[-1, 1]], # + NextPrime[#]] &, n, # > 2 &]; Array[a, 120, 2] (* Amiram Eldar, Oct 27 2024 *)

Formula

For n even: a(n) = A001222(n) - 1.
For n odd: a(n) = A001222(n) - 1 + A001222(A013634(A020639(n))).
Showing 1-5 of 5 results.