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.

Previous Showing 31-36 of 36 results.

A006197 Least number not dividing binomial(2n,n).

Original entry on oeis.org

3, 4, 3, 3, 5, 5, 5, 4, 3, 3, 5, 3, 3, 7, 7, 4, 7, 8, 9, 8, 7, 7, 7, 7, 5, 5, 3, 3, 9, 3, 3, 4, 8, 8, 5, 3, 3, 9, 3, 3, 13, 13, 13, 11, 11, 11, 11, 8, 7, 5, 5, 5, 13, 9, 5, 5, 5, 7, 7, 5, 5, 5, 7, 4, 7, 7, 9, 8, 13, 7, 7
Offset: 1

Views

Author

Keywords

Comments

All terms are prime powers (A246655). [Corrected by Amiram Eldar, May 27 2024]

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 1, b = Binomial[2*n, n]}, While[Divisible[b, k], k++]; k]; Array[a, 100] (* Amiram Eldar, May 27 2024 *)

Formula

a(n) = A007978(A000984(n)). - Amiram Eldar, May 27 2024

A173539 Square array read by antidiagonals: T(n,k)=0 if k is a divisor of n, otherwise T(n,k)=k.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, May 25 2010

Keywords

Comments

Observation: Column k is the sequence defined as: Period k: repeat (k-1 numbers k together with zero).
Note that the positive terms in row n are the non-divisors of n (See also A173540 and A173541).

Examples

			Array begins:
0,2,3,4,5,6,7,8,9,10,11,12;
0,0,3,4,5,6,7,8,9,10,11;
0,2,0,4,5,6,7,8,9,10;
0,0,3,0,5,6,7,8,9;
0,2,3,4,0,6,7,8;
0,0,0,4,5,0,7;
0,2,3,4,5,6;
0,0,3,0,5;
0,2,0,4;
0,0,3;
0,2;
0;
		

Crossrefs

A260218 a(1) = 2; for n > 1 if n is even a(n) = spf(1 + Product_{odd m,m

Original entry on oeis.org

2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 257, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 65537, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 97, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3, 2, 641, 2, 3, 2, 5, 2, 3, 2, 17, 2, 3, 2, 5, 2, 3
Offset: 1

Views

Author

Anders Hellström, Jul 19 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{a = {2}, k, m}, Do[If[EvenQ@ k, AppendTo[a, FactorInteger[Product[a[[m]], {m, 1, k - 1, 2}] + 1][[1, 1]]], AppendTo[a, FactorInteger[Product[a[[m]], {m, 2, k - 1, 2}] + 1][[1, 1]]]], {k, 2, n}]; a]; f@ 80 (* Michael De Vlieger, Jul 20 2015 *)
  • PARI
    spf(n)=factor(n)[1, 1]
    first(m)=my(v=vector(m), i, odd=2, even=1); v[1]=2; for(i=2, m, if(i%2==0, v[i]=spf(odd+1); even*=v[i], v[i]=spf(even+1); odd*=v[i])); v; /* Anders Hellström, Jul 19 2015 */
    
  • PARI
    A020639(n) = if(1==n,n,vecmin(factor(n)[, 1]));
    memoA260218 = Map();
    A260218(n) = if(1==n,2,if(mapisdefined(memoA260218,n),mapget(memoA260218,n), my(k, m, v = if(!(n%2), k=1; m=1; while(kA260218(k); k += 2); A020639(m+1), k=2; m=1; while(kA260218(k); k += 2); A020639(m+1))); mapput(memoA260218,n,v); (v))); \\ (An incrementally memoized version). Antti Karttunen, Sep 30 2018

Formula

It appears that for odd k, a(k) = 2 and for even k, a(k) = A002586(k/2). - Michel Marcus, Jul 20 2015

A281531 a(n) is the least numerator k such that the proper fraction k/n needs three or more terms as an Egyptian fraction, or 0 if no such numerator exists.

Original entry on oeis.org

0, 0, 0, 4, 0, 3, 7, 7, 8, 5, 11, 3, 6, 7, 7, 4, 13, 3, 13, 9, 5, 5, 17, 4, 6, 8, 12, 4, 14, 3, 7, 5, 8, 11, 17, 3, 6, 9, 17, 4, 18, 3, 7, 11, 7, 5, 21, 3, 8, 7, 11, 4, 13, 9, 13, 7, 7, 7, 28, 3, 5, 13, 7, 4, 10, 3, 11, 11, 13, 5, 23, 3, 6, 11, 9, 5, 11, 3, 19
Offset: 2

Views

Author

Arkadiusz Wesolowski, Jan 23 2017

Keywords

Comments

If n > 3 is prime, a(n) = A007978(n+1). - Robert Israel, Dec 26 2019

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [2..80] do for k in [1..n-1] do f:=k/n; x:=1; v:=0; if Numerator(f) eq 1 then v:=1; else while f lt 2/x do if Numerator(f-1/x) eq 1 then v:=1; break; end if; x+:=1; end while; end if; if v eq 0 then Append(~lst, k); break; end if; if k eq n-1 then Append(~lst, 0); end if; end for; end for; lst;
  • Maple
    f:= proc(n) option remember; local k,T;
      T:= numtheory:-divisors(n^2);
      for k from 2 to n-1 do
        g:= igcd(k,n);
        if g > 1 then
           r:= procname(n/g);
           if k = r*g then return k fi;
        else
           if not member(-n mod k,  T mod k) then return k fi
        fi
      od;
    0
    end proc;
    map(f, [$2..100]); # Robert Israel, Dec 25 2019
  • Mathematica
    a[n_] := a[n] = Module[{k, T}, T = Divisors[n^2]; For[k = 2, k <= n - 1, k++, g = GCD[k, n]; If[g > 1, r = a[n/g]; If[k == r g, Return [k]], If[FreeQ[Mod[T, k], Mod[-n, k]], Return [k]]]]; 0];
    a /@ Range[2, 100] (* Jean-François Alcover, Oct 06 2020, after Robert Israel *)

A332271 a(n) is the smallest positive integer that is not a divisor of the n-th highly composite number (A002182).

Original entry on oeis.org

2, 3, 3, 4, 5, 5, 5, 5, 7, 7, 7, 7, 7, 7, 9, 8, 9, 11, 11, 11, 11, 11, 11, 11, 13, 11, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 19, 17, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 23, 19, 19, 23, 23, 19, 23, 23, 23, 23, 23, 23
Offset: 1

Views

Author

Matthew Doucette, Jun 05 2020

Keywords

Comments

a(1)=2 and a(2)=3 are the only terms greater than the n-th highly composite number.
Terms are powers of primes (A000961). - David A. Corneth, Jul 12 2020
There are only 8 nonprimes in first 779674 terms: 4, 9, 8, 9, 16, 25, 25, 32. - Jason A. Doucette, Jul 20 2025

Examples

			a(1) = 2 = least non-divisor of 1.
a(2) = 3 = least non-divisor of 2.
a(3) = 3 = least non-divisor of 4.
a(4) = 4 = least non-divisor of 6.
a(5) = 5 = least non-divisor of 12.
...
		

Crossrefs

Programs

  • PARI
    nondiv(n) = {for (k=1, n+1, if (n % k, return (k)););} \\ A007978
    lista(nn) = {my(list=List([1]), r=1); forstep(n=2, nn, 2, if(numdiv(n)>r, r=numdiv(n); listput(list, n));); apply(x->nondiv(x), Vec(list));} \\ Michel Marcus, Jun 10 2020

Formula

a(n) = A007978(A002182(n)).

Extensions

a(67)-a(71) from David A. Corneth, Jul 12 2020
a(72) onward from Jason A. Doucette, Jul 20 2025

A089091 a(n) is the smallest composite number coprime to n and n+1.

Original entry on oeis.org

9, 25, 25, 9, 49, 25, 9, 25, 49, 9, 25, 25, 9, 121, 49, 9, 25, 25, 9, 121, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 121, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 49, 25, 9, 25, 49, 9, 25, 25, 9, 49, 49, 9, 25, 25, 9, 49, 25, 9, 25, 121, 9, 25, 25, 9, 49, 49, 9, 25, 25
Offset: 1

Views

Author

Labos Elemer, Nov 26 2003

Keywords

Crossrefs

Programs

  • Mathematica
    m=0;Table[fla=1;Do[s=GCD[n, k]; s1=GCD[n, k+1];s2=GCD[n, k+2];s3=GCD[n, k+3]; If[Equal[s, 1]&&Equal[s1, 1]&&!PrimeQ[n]&&!Equal[n, 1]&& Equal[fla, 1], m=m+1;Print[n];fla=0], {n, 1, 1000}], {k, 1, 256}]
  • Python
    from math import gcd
    def a(n):
        k, m = 3, n*(n+1)
        while gcd(k, m) != 1: k += 2
        return k*k
    print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Sep 25 2021

Formula

a(n) = A053670(n)^2.

Extensions

Offset corrected by Mohammed Yaseen, Aug 15 2023
Previous Showing 31-36 of 36 results.