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.

User: Franz Vrabec

Franz Vrabec's wiki page.

Franz Vrabec has authored 81 sequences. Here are the ten most recent ones:

A379851 Numbers k such that phi(k) does not divide k. Complement of A007694.

Original entry on oeis.org

3, 5, 7, 9, 10, 11, 13, 14, 15, 17, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89
Offset: 1

Author

Franz Vrabec, Jan 04 2025

Keywords

Comments

Let PHI(n) the set of all numbers x such there is a k-fold iteration of Euler's totient function phi = A000010 on x resulting in n. The numbers a(n) are exactly the numbers for which PHI(a(n)) is a finite set (possibly empty).
Contains A007617.

Crossrefs

Cf. A000010, A007617. Complement of A007694.

Programs

  • Maple
    filter:= n -> n mod numtheory:-phi(n) <> 0:
    select(filter, [$1..100]); # Robert Israel, Feb 04 2025
  • Mathematica
    Select[Range[100], ! Divisible[#, EulerPhi[#]] &] (* Amiram Eldar, Jan 08 2025 *)

A377191 Smallest number of digits that must be changed in n to obtain a palindrome (without changing the first digit to 0).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0
Offset: 0

Author

Franz Vrabec, Oct 19 2024

Keywords

Comments

The sequence is unbounded, with a(n) = k first occurring at n = A377192(k).

Examples

			a(12) = 1 because 12 is not a palindrome, but changing 1 digit appropriately (either the first or second in this case) yields a palindrome.
		

Crossrefs

Formula

a(A002113(n)) = 0, a(A029742(n)) > 0.
a(n) = 0 iff A136522(n) = 1, a(n) > 0 iff A136522(n) = 0.

A377192 Smallest number with the property that you have to change at least n digits to get a palindrome.

Original entry on oeis.org

0, 10, 1010, 100110, 10001110, 1000011110, 100000111110, 10000001111110, 1000000011111110, 100000000111111110, 10000000001111111110, 1000000000011111111110, 100000000000111111111110, 10000000000001111111111110, 1000000000000011111111111110, 100000000000000111111111111110
Offset: 0

Author

Franz Vrabec, Oct 19 2024

Keywords

Comments

Positions of records in A377191.

Examples

			a(2) = 1010 because 1010 is the smallest number with the property that you have to change at least 2 digits to get a palindrome.
		

Crossrefs

Programs

  • Mathematica
    A377192[n_] := Ceiling[10^(2*n-1) + (10^n-1)/9 - 1]; Array[A377192, 20, 0] (* or *)
    LinearRecurrence[{111, -1110, 1000}, {0, 10, 1010, 100110}, 20] (* Paolo Xausa, Nov 06 2024 *)

Formula

a(n) = 10^(2*n-1) + (10^n-1)/9 - 1 for n > 0.
From Stefano Spezia, Oct 20 2024: (Start)
G.f.: 10*x*(1 - 10*x - 90*x^2)/((1 - x)*(1 - 10*x)*(1 - 100*x)).
E.g.f.: (81 - 100*exp(x) + 10*exp(10*x) + 9*exp(100*x))/90. (End)
a(n) = A007088(A143960(n)) for n > 0. - Rémy Sigrist, Nov 05 2024

A365228 Denominator of Sum_{1<=j<=k<=n, gcd(j,k)=1} 1/(j*k).

Original entry on oeis.org

1, 2, 1, 3, 4, 20, 10, 210, 168, 504, 105, 1155, 792, 1560, 60060, 180180, 16016, 123760, 510510, 29099070, 21162960, 335920, 3233230, 74364290, 45762640, 187210800, 13385572200, 40156716600, 97349616, 31054527504, 166363540200, 12033629407800, 2831442213600, 1698865328160
Offset: 1

Author

Franz Vrabec, Aug 28 2023

Keywords

Crossrefs

Cf. A365227 (numerator of this sum).

Programs

  • Maple
    A365228 := proc(n)
       local j,k,s; s := 0;
       for j from 1 to n do
          for k from j to n do
             if gcd(j,k) = 1 then s := s + 1/(j*k);
             end if;
          end do;
       end do;
       denom(s);
    end proc;
    seq(A365228(n), n = 1..30);
    # second Maple program:
    a:= n-> denom(add(add(`if`(igcd(j, k)=1, 1/j, 0), j=1..k)/k, k=1..n)):
    seq(a(n), n=1..45);  # Alois P. Heinz, Aug 28 2023
  • Mathematica
    a[n_Integer]:=Module[{sum,j,k},sum=Sum[If[GCD[j,k]==1,1/(j*k),0],{j,1,n},{k,j,n}]; Denominator[sum]]; Table[a[n],{n,1,34}] (* Robert P. P. McKone, Aug 29 2023 *)
  • PARI
    a(n) = denominator(sum(j=1, n, sum(k=j, n, if (gcd(j,k)==1, 1/(j*k))))); \\ Michel Marcus, Aug 28 2023
    
  • Python
    from fractions import Fraction
    from math import gcd
    def A365228(n): return sum(sum(Fraction(1,j) for j in range(1,k+1) if gcd(j,k)==1)/k for k in range(1,n+1)).denominator # Chai Wah Wu, Aug 29 2023

A365227 Numerator of Sum_{1<=j<=k<=n, gcd(j,k)=1} 1/(j*k).

Original entry on oeis.org

1, 3, 2, 7, 11, 59, 33, 737, 631, 1973, 439, 4967, 3595, 7283, 289433, 891067, 82391, 647449, 2764637, 160300109, 119168603, 1923477, 19032303, 442903921, 278705461, 1155909107, 84109239017, 255355122859, 632225777, 203232858383, 1110186816983, 81194050820693
Offset: 1

Author

Franz Vrabec, Aug 27 2023

Keywords

Crossrefs

Cf. A365228 (denominator of this sum).

Programs

  • Maple
    A365227 := proc(n)
       local j,k,s; s := 0;
       for j from 1 to n do
          for k from j to n do
             if gcd(j,k) = 1 then s := s + 1/(j*k);
             end if;
          end do;
       end do;
       numer(s);
    end proc;
    seq(A365227(n), n = 1..20);
    # second Maple program:
    a:= n-> numer(add(add(`if`(igcd(j, k)=1, 1/j, 0), j=1..k)/k, k=1..n)):
    seq(a(n), n=1..45);  # Alois P. Heinz, Aug 28 2023
  • PARI
    a(n) = numerator(sum(j=1, n, sum(k=j, n, if (gcd(j,k)==1, 1/(j*k))))); \\ Michel Marcus, Aug 28 2023
  • Python
    from math import gcd
    from fractions import Fraction
    def A365227(n): return sum(sum(Fraction(1,j) for j in range(1,k+1) if gcd(j,k)==1)/k for k in range(1,n+1)).numerator # Chai Wah Wu, Aug 29 2023
    

A347277 Table T(n,k) read by downward antidiagonals: A quotient belonging to a generalization of Euler's theorem.

Original entry on oeis.org

0, 1, 0, 2, 1, 0, 3, 3, 2, 0, 4, 6, 8, 3, 0, 5, 10, 20, 18, 6, 0, 6, 15, 40, 60, 48, 8, 0, 7, 21, 70, 150, 204, 108, 18, 0, 8, 28, 112, 315, 624, 640, 312, 30, 0, 9, 36, 168, 588, 1554, 2500, 2340, 810, 56, 0, 10, 45, 240, 1008, 3360, 7560, 11160, 8160, 2184, 96, 0
Offset: 1

Author

Franz Vrabec, Aug 26 2021

Keywords

Comments

The quotient T(n,k) = (k^n - k^(n-phi(n)))/n results from the generalization k^n == k^(n-phi(n)) (mod n) of Euler's theorem (see Sierpiński, p. 243).
The n-th row of the table is equal to the n-th row of A074650 iff n = p^j (p prime, j>=1).

Examples

			T(4,3) = (3^4 - 3^2)/4 = 18.
Square array starts:
  0, 1,   2,   3,    4,    5, ...
  0, 1,   3,   6,   10,   15, ...
  0, 2,   8,  20,   40,   70, ...
  0, 3,  18,  60,  150,  315, ...
  0, 6,  48, 204,  624, 1554, ...
  0, 8, 108, 640, 2500, 7560, ...
		

References

  • W. Sierpiński, Elementary Theory of Numbers, Warszawa, 1964.

Crossrefs

Cf. A074650.

Programs

  • Maple
    with(numtheory):
    T:= proc(n, k) (k^n-k^(n-phi(n)))/n end:
    seq(seq(T(i, 1+d-i), i=1..d), d=1..11);
  • PARI
    T(n,k) = (k^n - k^(n - eulerphi(n)))/n; \\ Jinyuan Wang, Aug 28 2021

Formula

T(n,k) = (k^n - k^(n - phi(n)))/n.

Extensions

More terms from Jinyuan Wang, Aug 28 2021

A345289 Indices of low records in A346064.

Original entry on oeis.org

10, 11, 13, 846400, 5845240, 67621810, 67647250, 436771450
Offset: 1

Author

Franz Vrabec, Jul 16 2021

Comments

The corresponding record values are 21, 17, 15, 14, 13, 12, 11, 10.

Crossrefs

Cf. A346064.

A346064 Number of primes that may be generated by changing any two digits of n simultaneously.

Original entry on oeis.org

21, 17, 20, 15, 21, 20, 21, 16, 21, 17, 23, 18, 22, 17, 23, 22, 23, 17, 23, 19, 23, 19, 22, 16, 23, 22, 23, 18, 23, 18, 22, 18, 21, 16, 22, 21, 22, 17, 22, 17, 23, 18, 22, 17, 23, 22, 23, 17, 23, 19, 23, 19, 22, 16, 23, 22, 23, 18, 23, 18, 22, 18, 21, 16, 22
Offset: 10

Author

Franz Vrabec, Jul 03 2021

Keywords

Comments

Indices of low records are given by A345289. By heuristic considerations it is conjectured that a(n) > 0 for all n >= 10.

Examples

			Changing two digits of the number 17 simultaneously yields the primes 02,03,05,23,29,31,41,43,53,59,61,71,73,79,83,89, so a(17) = 16.
		

Crossrefs

Cf. A345289 (indices of record lows).
Cf. A209252 (changing one digit).

Programs

  • Maple
    A346064 := proc(n)
    local a, d, e, r, s, l, N, NN, nn, i;
    a := 0;
    N := convert(n, base, 10);
    l := nops(N);
    for d to l - 1 do
       for e from d + 1 to l do
          for r from 0 to 9 do
             for s from 0 to 9 do
            if r <> op(d, N) and s <> op(e, N) then
               NN := subsop(d = r, e = s, N);
               nn := add(op(i, NN)*10^(i - 1), i = 1 .. l);
               if isprime(nn) then a := a + 1; end if;
            end if;
            end do;
          end do;
       end do;
    end do;
    a;
    end proc:
  • Mathematica
    Table[Count[Flatten[FromDigits/@Tuples[ReplacePart[t=List/@IntegerDigits[n],{#->Complement[Range[0,9],t[[#]]],#2->Complement[Range[0,9],t[[#2]]]}]&@@#]&/@Subsets[Range@IntegerLength@n,{2}]],?PrimeQ],{n,10,100}] (* _Giorgos Kalogeropoulos, Jul 23 2021 *)
  • Python
    from sympy import isprime
    from itertools import combinations, product
    def change2(s):
        for i, j in combinations(range(len(s)), 2):
            for c, d in product("0123456789", repeat=2):
                if c != s[i] and d != s[j]:
                    yield s[:i] + c + s[i+1:j] + d + s[j+1:]
    def a(n): return sum(isprime(int(t)) for t in change2(str(n)))
    print([a(n) for n in range(10, 101)]) # Michael S. Branicky, Jul 23 2021

A342446 Square table read by antidiagonals downwards: T(n,k) = floor((4/(4^(1/2^n)-1))^(1/2^k)).

Original entry on oeis.org

1, 4, 1, 9, 2, 1, 21, 3, 1, 1, 44, 4, 1, 1, 1, 90, 6, 2, 1, 1, 1, 182, 9, 2, 1, 1, 1, 1, 367, 13, 3, 1, 1, 1, 1, 1, 736, 19, 3, 1, 1, 1, 1, 1, 1, 1475, 27, 4, 1, 1, 1, 1, 1, 1, 1, 2952, 38, 5, 2, 1, 1, 1, 1, 1, 1, 1, 5907, 54, 6, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Author

Franz Vrabec, Mar 12 2021

Keywords

Comments

Every positive integer occurs infinitely often.

Examples

			T(2,1) = floor((4/(4^(1/4)-1))^(1/2)) = floor(sqrt(4/(sqrt(2)-1))) = floor(3.1075...) = 3.
		

Formula

T(n,k) = floor((4/(4^(1/2^n)-1))^(1/2^k)).

A340765 Numbers k such that iterations of phi(k), phi(phi(k)), ... end in ... 6, 2, 1.

Original entry on oeis.org

6, 7, 9, 14, 18, 19, 27, 38, 54, 81, 162, 163, 243, 326, 486, 487, 729, 974, 1458, 1459, 2187, 2918, 4374, 6561, 13122, 19683, 39366, 39367, 59049, 78734, 118098, 177147, 354294, 531441, 1062882, 1594323, 3188646, 4782969, 9565938, 14348907, 28697814, 43046721, 86093442, 86093443, 129140163, 172186886
Offset: 1

Author

Franz Vrabec, Jan 20 2021

Keywords

Comments

Infinite set (see reference).
Contains 3^k for k >= 2 and 2*3^k for k >= 1, and all members of A111974 except 3. - Robert Israel, Dec 23 2021

Examples

			19 is in the list because phi(phi(19)) = phi(18) = 6.
		

Crossrefs

Cf. A000010, A340762 (complement relative to {n>=4}).

Programs

  • Maple
    R:= {6}: Agenda:= {6}: count:= 1:
    while count - nops(Agenda) < 99 do
      v:= min(Agenda);
      W:= convert(numtheory:-invphi(v),set);
      count:= count + nops(W);
      Agenda:= Agenda minus {v} union W;
      R:= R union W;
    od:
    sort(select(`<=`, convert(R,list),min(Agenda))); # Robert Israel, Dec 23 2021
  • Mathematica
    Select[Range[4, 10000], FixedPointList[EulerPhi, #][[-4]] == 6 &] (* Amiram Eldar, Jan 27 2021 *)
  • PARI
    isok(k) = if (k>=6, while((k!=6) && (k!=4), k=eulerphi(k))); k == 6; \\ Michel Marcus, Feb 01 2021