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

A270808 First differences of A270807, divided by 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 1, 2, 3, 1, 2, 1, 2, 1, 5, 3, 1, 5, 1, 8, 4, 5, 1, 2, 3, 6, 4, 2, 3, 1, 5, 1, 8, 1, 2, 6, 1, 2, 3, 1, 2, 4, 23, 1, 11, 3, 4, 2, 1, 23, 10, 2, 18, 1, 5, 1, 8, 6, 1, 8, 7, 23, 1, 2, 1, 5, 7, 2, 1, 2, 6, 18, 1, 2, 25, 2, 1, 32, 1, 17, 7, 2, 1, 2, 10, 14, 3, 7, 8
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2016

Keywords

Crossrefs

Cf. A270807.

Programs

  • Python
    from _future_ import division
    from sympy import primefactors
    A270808_list, a = [], 1
    for i in range(10001):
        b = a//(max(primefactors(a)+[1])) + 1
        A270808_list.append(b//2)
        a += b # Chai Wah Wu, Apr 06 2016

A271418 Define a sequence by b(1) = n, b(m) = b(m-1) + b(m-1)/A052126(m) + 1; then a(n) is the least m such that b(m) belongs to A270807.

Original entry on oeis.org

1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 2, 3, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 4, 1, 2, 3, 4, 1, 3, 1, 4, 2, 4, 1, 4, 1, 4, 4, 4, 3, 2, 2, 3, 2, 2, 1, 4, 2, 2, 2, 2, 1, 4, 1, 3, 3, 2, 3, 2, 2, 3, 2, 3, 1, 4, 1
Offset: 1

Views

Author

Cody M. Haderlie, Apr 06 2016

Keywords

Examples

			the sequence where b(1) = 2 is 2, 4, 7, 9, 13, 15, ...
7 is shared with A270807
there are 3 terms in 2, 4, 7; a(2) = 3
		

Crossrefs

Programs

  • Mathematica
    f[n_] := n + n/FactorInteger[n][[-1, 1]] + 1; s = NestList[f, 1, 10^2]; Table[Length@ NestWhileList[f, n, ! MemberQ[s, #] &], {n, 120}] (* Michael De Vlieger, Apr 08 2016 *)

Extensions

a(75) corrected by Chai Wah Wu, Apr 06 2016

A269304 a(n) = n + n/gpf(n) + 1, where gpf(n) is the greatest prime factor of n or 1 if n = 1.

Original entry on oeis.org

3, 4, 5, 7, 7, 9, 9, 13, 13, 13, 13, 17, 15, 17, 19, 25, 19, 25, 21, 25, 25, 25, 25, 33, 31, 29, 37, 33, 31, 37, 33, 49, 37, 37, 41, 49, 39, 41, 43, 49, 43, 49, 45, 49, 55, 49, 49, 65, 57, 61, 55, 57, 55, 73, 61, 65, 61, 61, 61, 73, 63, 65, 73, 97, 71, 73, 69
Offset: 1

Views

Author

Cody M. Haderlie, Feb 22 2016

Keywords

Comments

a(n) is odd except when n=2.
Initially, a(n) is frequently a square or a prime.
It is conjectured that any two sequences generated with a(n)=a(n-1)+a(n-1)/gpf(a(n-1))+1 and any initial value >=1 will have a finite number of non-shared terms and an infinite number of shared terms after one initial shared term (see A270807). Example: For a(1)=314, the sequence generated is 314, 317, 319, 331, 333, 343, 393, 397, 399, 421, 423, 433, ...; for a(1)=97, the sequence generated is 97, 99, 109, 111, 115, 121, 133, 141, 145, 151, 153, 163, 165, 181, 183, 187, 199, 201, 205, 211, 213, 217, 225, 271, 273, 295, 301, 309, 313, 315, 361, 381, 385, 421, 423, 433, ...; these sequences have respectively 9 and 33 terms not shared with the other until both reach 421; the following terms of both sequences are identical.

Examples

			For n=18765, a(n)=18901.
For n=196, a(n)=225 (225 is a square).
For n=103156, a(n)=105673 (105673 is prime).
		

Crossrefs

Programs

  • Mathematica
    Table[n+n/FactorInteger[n][[-1,1]]+1,{n,100}]
  • PARI
    gpf(n)=if(n>1, my(f=factor(n)[,1]); f[#f], 1)
    a(n)=n + n/gpf(n) + 1 \\ Charles R Greathouse IV, Feb 22 2016

Formula

a(n) = n + n/A006530(n) + 1.
a(n) = n + A052126(n) + 1.
a(p) = p+2 for p prime.

A330437 Length of trajectory of n under the map n -> n - 1 + n/gpf(n) or 0 if no fixed point is reached, where gpf(n) is the greatest prime factor of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 3, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 5, 4, 2, 1, 4, 1, 2, 4, 4, 3, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 3, 2, 2, 3, 1, 2, 2, 3, 2, 2, 1, 2, 1, 3, 2, 4, 3, 2, 1, 2, 2, 2, 1, 4, 1, 3, 2, 2, 2, 2, 1, 4, 2, 2, 1, 4, 2, 3, 2, 4, 1, 2, 2, 4, 4, 4, 3, 2, 1, 3, 2, 4
Offset: 1

Views

Author

Elijah Beregovsky, Feb 16 2020

Keywords

Comments

The table of trajectories of n under is given in A329288.
All fixed points, besides 1, are prime.
Conjecture: every number appears in the sequence infinitely many times.
Conjecture: all terms are nonzero, i.e., every trajectory eventually reaches a prime.

Examples

			For n = 26 the trajectory is (26, 27, 35, 39, 41) so a(26) = 5.
		

Crossrefs

Cf. A006530 (greatest prime factor), A329288, A330704 (greedy inverse).

Programs

  • Maple
    g:= n -> n - 1 + n/max(numtheory:-factorset(n)):
    f:= proc(n) option remember;
        if isprime(n) then 1 else 1+ procname(g(n)) fi
    end proc:
    f(1):= 1:
    map(f, [$1..200]); # Robert Israel, May 01 2020
  • Mathematica
    Clear[f,it,order,seq]; f[n_]:=f[n]=n-1+n/FactorInteger[n][[-1]][[1]]; it[k_,n_]:=it[k,n]=f[it[k,n-1]]; it[k_,1]=k; order[n_]:=order[n]=SelectFirst[Range[1,100], it[n,#]==it[n,#+1]&]; Print[order/@Range[1,100]];
  • PARI
    apply( {a(n,c=1)=n>1&&while(nM. F. Hasler, Feb 19 2020

Formula

a(p) = 1 for any prime number p.
Showing 1-4 of 4 results.