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.

A171937 Forward van Eck transform of A000005.

Original entry on oeis.org

0, 1, 2, 5, 2, 2, 4, 2, 16, 4, 2, 6, 4, 1, 6, 65, 2, 2, 4, 8, 1, 4, 6, 6, 24, 1, 6, 4, 2, 10, 6, 12, 1, 1, 3, 64, 4, 1, 7, 2, 2, 12, 4, 1, 5, 5, 6, 32, 72, 2, 4, 11, 6, 2, 2, 10, 1, 4, 2, 12, 6, 3, 5, 665, 4, 4, 4, 7, 5, 8, 2, 12, 6, 3, 1, 16, 5, 10, 4, 32, 544, 3, 6, 6, 1, 1, 4, 14, 8, 6, 2, 6, 1, 1, 11
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2010

Keywords

Comments

Least positive k such that d(n) = d(n+k), or 0 if no such k exists (d = A000005). - Altug Alkan, Jul 29 2016

Crossrefs

Programs

  • Mathematica
    {0}~Join~Array[Block[{k = 1}, While[DivisorSigma[0, #] != DivisorSigma[0, # + k], k++]; k] &, 94, 2] (* Michael De Vlieger, Aug 19 2021 *)
  • PARI
    a(n) = if (n==1, 0, my(m=1, nd=numdiv(n)); while(numdiv(n+m) != nd, m++); m); \\ Michel Marcus, Sep 14 2021

Formula

a(n) = A079427(n) - n. - Ridouane Oudra, Sep 14 2021

A171934 Backwards van Eck transform of A000010.

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 0, 3, 2, 2, 0, 2, 0, 5, 0, 1, 0, 4, 0, 4, 8, 11, 0, 4, 0, 5, 8, 2, 0, 6, 0, 15, 8, 2, 0, 8, 0, 11, 4, 6, 0, 6, 0, 11, 6, 23, 0, 8, 6, 6, 0, 7, 0, 16, 14, 4, 20, 29, 0, 12, 0, 31, 6, 13, 0, 16, 0, 4, 0, 14, 0, 2, 0, 11, 20, 2, 16, 6, 0, 12, 0, 7, 0, 6, 0, 37, 0, 6, 0, 6, 18, 23, 16, 47
Offset: 1

Views

Author

N. J. A. Sloane, Oct 24 2010

Keywords

Comments

Given a sequence a, the backwards van Eck transform b is defined as follows: If a(n) has already appeared in a, let a(m) be the most recent occurrence, and set b(n)=n-m; otherwise b(n)=0. (Comment from A171899).

Crossrefs

Programs

  • Mathematica
    Block[{a = Array[EulerPhi, 94], b = {}, m}, Do[If[! IntegerQ[m[#]], Set[m[#], i]; AppendTo[b, 0], AppendTo[b, i - m[#]]; Set[m[#], i]] &@ a[[i]], {i, Length[a]}]; b] (* Michael De Vlieger, Apr 06 2021 *)
  • PARI
    up_to = 105;
    backVanEck_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = i-pp, outvec[i] = 0); mapput(om,invec[i],i)); outvec; };
    v171934 = backVanEck_transform(vector(up_to,n,eulerphi(n)));
    A171934(n) = v171934[n]; \\ Antti Karttunen, Apr 06 2021
Showing 1-2 of 2 results.