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

A134187 a(0)=1. a(n) = the number of terms of the sequence (from among terms a(0) through a(n-1)) which equal any "non-isolated divisors" of (2n). A divisor, k, of n is non-isolated if (k-1) or (k+1) also divides n.

Original entry on oeis.org

1, 1, 2, 3, 3, 3, 6, 3, 3, 8, 3, 3, 10, 3, 3, 13, 3, 3, 14, 3, 3, 17, 3, 3, 18, 3, 3, 20, 4, 3, 23, 3, 3, 23, 3, 3, 27, 3, 3, 27, 4, 3, 31, 3, 3, 32, 3, 3, 34, 3, 5, 33, 3, 3, 37, 4, 4, 35, 3, 3, 43, 3, 3, 40, 3, 3, 45, 3, 3, 43, 8, 3, 50, 3, 3, 48, 3, 3, 53, 3, 8, 49, 3, 3, 59, 3, 3, 53, 3, 3, 62, 5
Offset: 0

Views

Author

Leroy Quet, Oct 12 2007

Keywords

Examples

			The positive divisors of 2*12=24 are 1,2,3,4,6,8,12,24. Of these, 1,2,3,4 are the non-isolated divisors of 24. There are 2 terms among the earlier terms of the sequence that equal 1, 1 term that equals 2, 7 terms which equal 3 and 0 terms which equal 4. So a(12) = 2+1+7+0 = 10.
		

Crossrefs

Programs

  • PARI
    up_to = 91;
    A134187list(up_to) = { my(v=vector(1+up_to)); v[1] = 1; for(n=1,up_to,v[1+n] = sum(k=0,n-1,my(u=v[1+k]); !((2*n)%u) && ((!((2*n)%(1+u))) || ((u>1)&&(!((2*n)%(u-1))))))); (v); };
    v134187 = A134187list(up_to);
    A134187(n) = v134187[1+n]; \\ Antti Karttunen, Apr 06 2021

Extensions

Extended by Ray Chandler, Jun 25 2008

A133828 a(n) = the smallest "isolated divisor" of n, or 0 if no such divisor exists. A positive divisor, k, of n is isolated if neither (k-1) nor (k+1) divides n.

Original entry on oeis.org

1, 0, 1, 4, 1, 6, 1, 4, 1, 5, 1, 6, 1, 7, 1, 4, 1, 6, 1, 10, 1, 11, 1, 6, 1, 13, 1, 4, 1, 10, 1, 4, 1, 17, 1, 6, 1, 19, 1, 8, 1, 14, 1, 4, 1, 23, 1, 6, 1, 5, 1, 4, 1, 6, 1, 4, 1, 29, 1, 10, 1, 31, 1, 4, 1, 6, 1, 4, 1, 5, 1, 6, 1, 37, 1, 4, 1, 6, 1, 8, 1, 41, 1, 12, 1, 43, 1, 4, 1, 15, 1, 4, 1, 47, 1, 6, 1
Offset: 1

Views

Author

Leroy Quet, Sep 25 2007

Keywords

Comments

a(2n-1) = 1 for all positive integers n. 2 has no isolated divisors. a(2) is 0 only as a placeholder.

Examples

			a(18)=6 because the isolated divisors of 18 are 6,9 and 18.
		

Crossrefs

Programs

  • Maple
    with(numtheory): a:=proc(n) local div, ISO, i: div:=divisors(n): ISO:={}: for i to tau(n) do if member(div[i]-1, div)=false and member(div[i]+1, div) = false then ISO := `union`(ISO, {div[i]}) end if end do end proc: 1, 0, seq(a(j)[1],j=3..80); # Emeric Deutsch, Oct 16 2007
    A133828 := proc(n) local divs,k,i ; divs := sort(convert(numtheory[divisors](n),list)) ; for i from 1 to nops(divs) do k := op(i,divs) ; if not k-1 in divs and not k+1 in divs then RETURN(k) ; fi ; od: RETURN(0) ; end: seq(A133828(n),n=1..100) ; # R. J. Mathar, Oct 19 2007
  • Mathematica
    a[n_] := If[OddQ[n], 1, For[d = 2, d <= n, d++, If[Divisible[n, d] && !Divisible[n, d-1] && !Divisible[n, d+1], Return[d]]]] /. Null -> 0;
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 20 2024 *)
  • PARI
    A133828(n) = if(n%2,1,fordiv(n,d,if((d>1)&&(n%(d-1))&&(n%(d+1)), return(d))); (0)); \\ Antti Karttunen, Apr 01 2021

Extensions

More terms from Emeric Deutsch and R. J. Mathar, Oct 16 2007
Showing 1-2 of 2 results.