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

A108738 a(n) = n/(smallest odd prime divisor of n), if any.

Original entry on oeis.org

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

Views

Author

S. Muthukrishnan (muthu(AT)research.att.com), Jun 23 2005

Keywords

Comments

a(n) = n if n has no odd prime divisor, i.e. for n = 2^k (k>=0).

Examples

			a(21) = 21/3 = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local nn: nn:=factorset(n): if n=1 then 1 elif nn={2} then n elif nn[1]=2 then n/nn[2] else n/nn[1] fi end: seq(a(n),n=1..100); # Emeric Deutsch, Jun 24 2005
  • Mathematica
    f[n_] := If[IntegerQ@Log[2, n], n, pf = First /@ FactorInteger@n; If[ EvenQ@n, n/pf[[2]], n/pf[[1]] ]]; Array[f, 89] (* Robert G. Wilson v, Sep 02 2006 *)
  • PARI
    a(n) = my(v = select(x->((x%2)==1), factor(n)[,1]));  n/if (#v, vecmin(v), 1); \\ Michel Marcus, Oct 25 2017
    
  • PARI
    first(n) = {my(res = vector(n, i, i)); forprime(p = 3, n, for(k = 1, n\p, if(res[k*p] == k*p, res[k*p]\=p))); res} \\ David A. Corneth, Oct 25 2017

Formula

a(n) = n/A078701(n).

Extensions

More terms from Emeric Deutsch and Reinhard Zumkeller, Jun 24 2005

A108511 a(n) is the smallest number m such that prime(m) = n*m - 1, or 0 if no such m exists.

Original entry on oeis.org

0, 2, 1, 0, 70, 182, 440, 1053, 0, 6458, 0, 40087, 0, 251737, 637320, 1617173, 4124466, 10553445, 27067100, 69709705, 179992910, 465769811, 0, 3140421738, 8179002128, 21338685403, 0, 0, 382465573528, 0, 0, 6935812012545, 18262325820324, 0, 0, 335276334036937
Offset: 1

Views

Author

Farideh Firoozbakht, Jun 12 2005

Keywords

Comments

A108512(n) gives number of solutions of the equation prime(x) = n*x - 1.

Examples

			a(26) = 21338685403 because prime(21338685403) = 26*21338685403 - 1 and 21338685403 is the smallest (only) number m with this property.
		

Crossrefs

Extensions

a(29)-a(33) from Donovan Johnson, Nov 15 2009
a(34)-a(36) from Jinyuan Wang, Aug 09 2021

A108512 a(n) is number of solutions of equation prime(x) = n*x - 1.

Original entry on oeis.org

0, 3, 2, 0, 2, 1, 1, 1, 0, 3, 0, 2, 0, 2, 3, 1, 1, 8, 2, 9, 2, 1, 0, 5, 3, 1, 0, 0, 1, 0, 0, 3, 1, 0, 0, 6, 3, 0, 5, 2
Offset: 1

Views

Author

Farideh Firoozbakht, Jun 13 2005

Keywords

Examples

			a(4) = 0 because the equation prime(x) = 4*x - 1 has no solution.
a(20) = 9 because the length of set of the solutions of equation prime(x) = 20*x - 1 namely length of {69709705, 69709719, 69709734, 69709873, 69709878, 69709932, 69709935, 69709944, 69709965} equals 9.
		

Crossrefs

Extensions

a(29)-a(33) from Donovan Johnson, Nov 15 2009
a(34)-a(40) from Jinyuan Wang, Aug 09 2021
Showing 1-3 of 3 results.