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 11-20 of 20 results.

A120611 Sum of previous term and preceding divisors.

Original entry on oeis.org

1, 2, 3, 4, 7, 8, 15, 19, 20, 27, 31, 32, 47, 48, 66, 72, 90, 111, 115, 116, 123, 127, 128, 175, 183, 187, 188, 242, 245, 253, 254, 384, 610, 613, 614, 617, 618, 624, 690, 826, 836, 862, 865, 866, 869, 870, 891, 922, 925, 926, 929, 930, 982, 985, 986, 989, 990
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    a = {1, 2}; Do[AppendTo[a, Plus @@ Intersection[a, Divisors[a[[-1]]]]], {n, 3, 57}]; a (* Ivan Neretin, May 13 2015 *)

Formula

a(1) = 1, a(2) = 2, for n>=2, a(n+1) = a(n) + sum_{1<=k

A283166 a(0) = 0; a(1) = 1; a(2*n) = sigma(a(n)), a(2*n+1) = sigma(a(n)) + sigma(a(n+1)).

Original entry on oeis.org

0, 1, 1, 2, 1, 4, 3, 4, 1, 8, 7, 11, 4, 11, 7, 8, 1, 16, 15, 23, 8, 20, 12, 19, 7, 19, 12, 20, 8, 23, 15, 16, 1, 32, 31, 55, 24, 48, 24, 39, 15, 57, 42, 70, 28, 48, 20, 28, 8, 28, 20, 48, 28, 70, 42, 57, 15, 39, 24, 48, 24, 55, 31, 32, 1, 64, 63, 95, 32, 104, 72, 132, 60, 184, 124, 184, 60, 116, 56, 80, 24, 104, 80, 176, 96, 240, 144, 200, 56, 180, 124
Offset: 0

Author

Ilya Gutkovskiy, Mar 02 2017

Keywords

Comments

A variation on Stern's diatomic sequence (A002487) and iterating the sum of the divisors function (A007497).

Examples

			a(0) = 0;
a(1) = 1;
a(2) = a(2*1) = sigma(a(1)) = sigma(1) = 1;
a(3) = a(2*1+1) = sigma(a(1)) + sigma(a(2)) = sigma(1) + sigma(1) = 1 + 1  = 2;
a(4) = a(2*2) = sigma(a(2)) =  sigma(1) = 1;
a(5) = a(2*2+1) = sigma(a(2)) + sigma(a(3)) =  sigma(1) + sigma(2) = 1 + 3 = 4, etc.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], DivisorSigma[1, a[n/2]], DivisorSigma[1, a[(n - 1)/2]] + DivisorSigma[1, a[(n + 1)/2]]]; Table[a[n], {n, 0, 90}]
  • PARI
    a(n) = if (n<2, n, if (n%2==0, sigma(a(n/2)), sigma(a((n-1)/2))+sigma(a((n+1)/2))));
    tabl(nn)={for (n=0, nn, print1(a(n), ", "); ); };
    tabl(90); \\ Indranil Ghosh, Mar 03 2017

A059460 Iteration of unitary-sigma function: a(1) = 2, a(n) = usigma(a(n-1)).

Original entry on oeis.org

2, 3, 4, 5, 6, 12, 20, 30, 72, 90, 180, 300, 520, 756, 1120, 1584, 2040, 3888, 4148, 5580, 9600, 13416, 22176, 31680, 46800, 61880, 108864, 126880, 171864, 276480, 344232, 492480, 639600, 1039584, 1663200, 2306304, 3454080, 6390144
Offset: 1

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ (1 + Power@@@ FactorInteger[n]); NestList[f, 2, 30] (* Amiram Eldar, Aug 11 2019 *)

Extensions

Corrected by Jud McCranie, Oct 28 2001

A126850 a(n) = OrdinaryUnitarySigma(a(n-1)).

Original entry on oeis.org

2, 3, 4, 7, 8, 15, 24, 60, 168, 480, 1512, 3360, 12096, 28448, 64512, 163760, 401760, 991872, 2399040, 6858000, 13999104, 32752000, 69400800, 172186560, 517867392, 1666990080, 5662137600, 14475575296, 33946612000, 73359820800, 158022774000
Offset: 2

Author

Yasutoshi Kohmoto, Feb 24 2007

Keywords

Crossrefs

Programs

  • Maple
    A034448 := proc(n) local ifs,d ; if n = 1 then 1; else ifs := ifactors(n)[2] ; mul(1+ op(1,op(d,ifs))^op(2,op(d,ifs)),d=1..nops(ifs)) ; fi ; end: A006519 := proc(n) local i ; for i in ifactors(n)[2] do if op(1,i) = 2 then RETURN( op(1,i)^op(2,i) ) ; fi ; od: RETURN(1) ; end: A107749 := proc(n) local p2 ; p2 := A006519(n) ; numtheory[sigma](p2)*A034448(n/p2) ; end: A126850 := proc(n) option remember ; if n = 1 then 2; else A107749(A126850(n-1)) ; fi ; end: seq(A126850(n),n=1..40) ; # R. J. Mathar, Jun 15 2008
  • Mathematica
    f[2, e_] := 2^(e + 1) - 1;
    f[p_, e_] := p^e + 1;
    A107749[n_] := If[n == 1, 1, Times @@ f @@@ FactorInteger[n]];
    a[n_] := a[n] = If[n == 2, 2, A107749[a[n - 1]]];
    Table[a[n], {n, 2, 32}] (* Jean-François Alcover, Jul 22 2024, after Amiram Eldar in A107749 *)

Formula

a(n)= A107749(a(n-1)). - R. J. Mathar, Jun 15 2008

Extensions

Edited and extended by R. J. Mathar, Jun 15 2008

A283167 a(0) = 1; a(2*n) = 2*a(n), a(2*n+1) = sigma(a(n)).

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 2, 1, 8, 7, 6, 4, 4, 3, 2, 1, 16, 15, 14, 8, 12, 12, 8, 7, 8, 7, 6, 4, 4, 3, 2, 1, 32, 31, 30, 24, 28, 24, 16, 15, 24, 28, 24, 28, 16, 15, 14, 8, 16, 15, 14, 8, 12, 12, 8, 7, 8, 7, 6, 4, 4, 3, 2, 1, 64, 63, 62, 32, 60, 72, 48, 60, 56, 56, 48, 60, 32, 31, 30, 24, 48, 60, 56, 56, 48, 60, 56, 56, 32, 31, 30
Offset: 0

Author

Ilya Gutkovskiy, Mar 02 2017

Keywords

Examples

			a(0) = 1;
a(1) = a(2*0+1) = sigma(a(0)) = sigma(1) = 1;
a(2) = a(2*1) = 2*a(1) = 2*1 = 2;
a(3) = a(2*1+1) = sigma(a(1)) = sigma(1) = 1;
a(4) = a(2*2) = 2*a(2) = 2*2 = 4;
a(5) = a(2*2+1) = sigma(a(2)) = sigma(2) = 1 + 2 = 3, etc.
		

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := If[EvenQ[n], 2 a[n/2], DivisorSigma[1, a[(n - 1)/2]]]; Table[a[n], {n, 0, 90}]
  • PARI
    a(n) = if (n==0, 1, if (n%2==0, 2*a(n/2),sigma(a((n-1)/2))));tabl(nn)={for (n=0,nn,print1(a(n),", "););};tabl(90) \\ Indranil Ghosh, Mar 03 2017

Formula

a(2*n) - a(2*n+1) = A033879(a(n)).
a(2*n+1) - a(2*n) = A033880(a(n)).

A283764 a(0) = 0; a(1) = 1; a(2*n) = sigma(a(n)), a(2*n+1) = sigma(a(n)+a(n+1)).

Original entry on oeis.org

0, 1, 1, 3, 1, 7, 4, 7, 1, 15, 8, 12, 7, 12, 8, 15, 1, 31, 24, 24, 15, 42, 28, 20, 8, 20, 28, 42, 15, 24, 24, 31, 1, 63, 32, 72, 60, 124, 60, 56, 24, 80, 96, 144, 56, 124, 42, 56, 15, 56, 42, 124, 56, 144, 96, 80, 24, 56, 60, 124, 60, 72, 32, 63, 1, 127, 104, 120, 63, 210, 195, 336, 168, 360, 224, 360, 168, 210, 120, 186, 60, 210, 186, 372, 252, 744, 403, 465, 120, 546
Offset: 0

Author

Ilya Gutkovskiy, Mar 16 2017

Keywords

Comments

A variation on Stern's diatomic sequence (A002487) and iterating the sum of the divisors function (A007497).

Crossrefs

Programs

  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := If[EvenQ[n], DivisorSigma[1, a[n/2]], DivisorSigma[1, a[(n - 1)/2] + a[(n + 1)/2]]]; Table[a[n], {n, 0, 100}]
  • PARI
    a(n) = if(n<2, n, if(Mod(n,2), sigma(a((n - 1)/2) + a((n + 1)/2)), sigma(a(n/2))));
    for(n=0, 100, print1(a(n),", ")) \\ Indranil Ghosh, Mar 16 2017

A286011 a(1)=1, and for n>1, a(n) is the maximum number of iterations of sigma resulting in n, starting at some integer k; or 0 if n cannot be reached from any k.

Original entry on oeis.org

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

Author

Michel Marcus, Apr 30 2017

Keywords

Comments

a(n)=0 for n in A007369 and a(n)>0 for n in A002191.
Records are found at indices given by A007497.
The above would be correct for a(1) = 0 (in a weak sense) or rather a(1) = -1 (for infinity), but as the sequence is defined, 2 & 3 do not produce a record, so the indices of records are 1, (3), 4, 7, ... = {1} U A007497 \ {2, (3)}. - M. F. Hasler, Nov 20 2019

Examples

			a(4)=2 because 4=sigma(3), but also sigma(sigma(2)) with 2 iterations.
a(7)=3 because 7=sigma(4), but also sigma(sigma(3)), and sigma(sigma(sigma(2))), with 3 iterations.
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(1)..a(N)
    V:= Vector(N):
    for n from 1 to N do
      s:= numtheory:-sigma(n);
      if s <= N then V[s]:= max(V[s],V[n]+1) fi
    od:
    convert(V,list); # Robert Israel, May 01 2017
  • PARI
    a(n) = {if (n==1, return(1)); vn = vector(n-1, k, k+1); nb = 0; knb = 0; ok = 1; while(ok, nb++; vn = vector(#vn, k, sigma(vn[k])); svn = Set(vn); if (#select(x->x==n, svn), knb = nb); if (!#select(x->x<=n, svn), ok = 0);); knb;}
    
  • PARI
    apply( A286011(n)=if(n<3,2-n, n=invsigma(n), vecmax(apply(self,n))+1), [1..99]) \\ See Alekseyev-link for invsigma(). - M. F. Hasler, Nov 20 2019

A309727 a(n) is the least integer k such that for some iteration of sigma applied to k, one gets the n-th term of A002191, the list of possible values for the function sum of divisors.

Original entry on oeis.org

1, 2, 2, 5, 2, 2, 5, 9, 9, 2, 10, 19, 2, 5, 29, 16, 16, 22, 37, 10, 27, 19, 43, 33, 34, 5, 49, 2, 61, 16, 67, 29, 73, 45, 49, 43, 27, 22, 50, 19, 52, 101, 16, 85, 109, 22, 73, 5, 81, 33, 67, 64, 50, 86, 81, 137, 76, 66, 149, 111, 99, 157, 81, 106, 163, 2, 52, 173, 129
Offset: 1

Author

Michel Marcus, Oct 14 2019

Keywords

Comments

The set union of this sequence is 1 U A007369.

Examples

			For n = 5, A002191(5) is 7, and 4 iterations of sigma applied to 2 give 7, and no integer less than 2 will give 7, so a(5)=2.
		

Crossrefs

A257670 is a better version for this sequence.

Programs

  • PARI
    list(lim) = select(n->n<=lim, Set(vector(lim\=1, n, sigma(n))));
    lista(nn) = {my(vs = list(nn), v = vector(#vs)); v[1] = 1; for (n=2, #vs, for (k=2, vs[n], my(kk=k); while (sigma(kk) <= vs[n], kk=sigma(kk)); if (kk == vs[n], v[n] = k; break););); v;}

Formula

a(n) = 2 when A002191(n) is in A007497.
a(n) = 5 when A002191(n) is in A051572.
a(n) = 16 when A002191(n) is in A257349.

A337436 6*a(n) + 1 is the least upper prime p of a pair of twin primes p - 2, p, for which the prime gap immediately following p achieves the size 2*A007494(n).

Original entry on oeis.org

1, 5, 23, 33, 322, 87, 325, 278, 495, 1293, 2027, 4725, 3468, 2690, 27177, 14438, 4245, 6773, 13283, 24938, 104283, 92067, 28893, 60015, 119362, 46905, 44270, 106323, 90713, 67475, 266618, 207107, 139708, 1496910, 716182, 598867, 439633, 688518, 224922, 315893
Offset: 1

Author

Hugo Pfoertner, Sep 02 2020

Keywords

Comments

Apart from the atypical case [3, 5, 7], prime gaps nextprime(p+1)-p following a pair of twin primes p-2, p can only have the sizes 4, 6, 10, 12, 16, 18, ..., i.e., numbers k of the form 2*(k == 0 or 2 mod 3) = 2*A007494(n).

Examples

			a(1) = 1: The first occurrence of 3 consecutive primes [p-2, p, p+4] is at p = 6*a(1) + 1 = 7 -> [5, 7, 11],
a(2) = 5: consecutive primes [p-2, p, p+6] first occur at p = 6*a(2) * 1 = 31 -> [29, 31, 37],
a(3) = 23: consecutive primes [p-2, p, p+10] first occur at p = 6*a(3) + 1 = 139 -> [137, 139, 149].
		

Crossrefs

A285634 a(1) = 4, a(n) = Product_{d|a(n-1)} d.

Original entry on oeis.org

4, 8, 64, 2097152, 3450873173395281893717377931138512726225554486085193277581262111899648
Offset: 1

Author

Ilya Gutkovskiy, Apr 23 2017

Keywords

Comments

Iterating the product-of-divisors function.
The next term is too large to include.
Let a(n) = Product_{d|a(n-1)} d, with a(1) = p^k, p is a prime, k >= 0 and b(n) = b(n-1)*(b(n-1) + 1)/2, with b(1) = k, then a(n) = p^b(n).
The next term has 8067 digits. - Harvey P. Dale, Apr 18 2019

Examples

			a(1) = 4;
a(2) = 8 because 4 has 3 divisors {1, 2, 4} and 1*2*4 = 8;
a(3) = 64 because 64 has 7 divisors {1, 2, 4, 8, 16, 32, 64} and 1*2*4*8*16*32*64 = 2097152, etc.
...
a(6) = 2^26796;
a(7) = 2^359026206;
a(8) = 2^64449908476890321;
a(9) = 2^2076895351339769460477611370186681, etc.
		

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[1] == 4, a[n] == Sqrt[a[n - 1]]^DivisorSigma[0, a[n - 1]]}, a, {n, 5}]
    NestList[Times@@Divisors[#]&,4,4] (* Harvey P. Dale, Apr 18 2019 *)

Formula

a(1) = 4, a(n) = a(n-1)^(A000005(a(n-1))/2).
a(n) = 2^A007501(n-1).
Previous Showing 11-20 of 20 results.